Behaviour of DragControls in AR scenarios - horizontal movement

Hello @ROBYER1 :wave:
As @herbst🌵 mentioned, I worked on a system with similar drag behaviour. To get it done, I flag a mesh as ground via “IsGround” component and add a “AlignHeightToGround” component to my dragable objects. This “AlignHeightToGround” performs raycasts down and sets the Y position to the intersection point, if a ground mesh is hit.
alignHeight.mp4

by user 313350482108088320

Here are the corresponding scripts. I hope this approach can help you.
AlignHeightToGround.ts
IsGround.ts

by user 313350482108088320

You are my saviour! I was actually having a lot of trouble porting Google’s Model Viewer over but with a starting point like this I should be able to crack the scale/rotation on top of this as I am looking into detecting individual touches. I’ll share back what I come up with to help others too :slightly_smiling_face:

by user 103054507105067008

I am trying to find what overrides DragControls behaviour when in AR, as I put some logs in to tell me if the onPointerDown/onPointerUp events fire in AR and those do, I also commented out any WebXR checks in my copy of the script but it doesn’t make a difference. The only differentiator I found is enable/disable of Can Grab on the component which stops WebXR grabbing

by user 103054507105067008

Why do you not do this?

I really liked the behaviour of DragControls so I was using it as a starting point

by user 103054507105067008