Prevent Virtual Objects translating into Physical Walls in response to TranslationGesture

Hi,

After placing a virtual object(chair) from a USDZ onto a horizontal Plane, I setup gestures something like:

modelEntity.generateCollisionShapes(recursive: true)
arView?.installGestures([.translation, .rotation], for: modelEntity)

Translation and Rotation seem to work fine, but when I drag the virtual object towards a wall, it seems to "go into" the wall instead of stopping at the wall.

Is there a way to achieve this in RealityKit? Do I need to implement my own GestureRecognizers and perform raycast on each PanGesture callback?

Thank you

Prevent Virtual Objects translating into Physical Walls in response to TranslationGesture
 
 
Q