SixDofDragBehavior.zDragFactor has no effect?

Hello, I’m playing around with SixDofDragBehavior using ray pointer actions with a VR controller, and I noticed the mesh doesn’t move toward or away from you when you move the controller toward the mesh or away from it. Seems like this is what zDragFactor is for but changing the value seems to have very little effect.

I assume this may be because the movement is based on the endpoint of the ray cast and not the origin, which doesn’t change much when moving the controller in this manner.

could be related to what was happening here (Grab Behavior issue while using WebXR Movement Controls)

1 Like

cc @Cedric and @RaananW as one of them might know

i’ll debug this later today :slight_smile:


It does work, but since the sphere is so big, it doesn’t feel like it, at least not in this scene. The Drag Behavior, when used in XR, does to the local z axis what it does to the other 2 in screen scenarios - it keeps it 1-to-1. Meaning - if you drag 1 unit back, the object will move one unit towards you. The sphere in the demo is 5 units away, so you will have to pull a few times until it reaches you.

I can look into scaling the z factor in XR, meaning, 1 unit pull would be 1 * scaleFactor. Not sure how simple / hard it could be. And it will probably have to wait before we are done with everything related to 7.0. The decision to keep it 1-to-1 was because this is the reasoning behind the 6DoF - it goes where you drag.

The PR you linked solved the drag behavior for drag behavior with remote controllers. Until this point it was only working correctly with near interactions.

1 Like

Thanks for looking into this!

Your proposed solution is sorta what I have implemented as a interim solution, it feels a little hacky but this is more or less how I imagine 6dof drag should work in XR

A more ideal solution would be a scaling scale factor that changes based on how far the target is from the user. Ill post another play ground if I get something working nicely.