Immersive Drag doesn't move proportional to hand movement

I’m trying to implement the functionality that the user, from anywhere, can drag to move around the content. I don’t think near dragging does what I want. So, I implemented the following with Junie’s help (squeeze grip on a controller to drag or, with hands on a Quest, do the tap-thumb microgesture to toggle dragging Babylon.js docs ):

This does indeed drag, but the contents don’t appear to be dragged as far as the hand moves.

Also, for my real content (I haven’t observed this on the playground), there’s always jitter while dragging. If I drag faster, the jitter increases, and stays large even when I drag slower (which I’m sure should be telling me something).

Should I be doing different math to implement dragging? Should I not be setting the camera position in onBeforeRenderObservable ?

cc @amoebachant

I’m sure there’s something I could learn from this, but I realized the interaction I wanted was best served by enclosing the content in a TransformNode and dragging that. Which works as intended.

Thanks much for your help!

Glad the TransformNode approach is working for you - let us know if anything else comes up!