Forum Discussion
modhdhruv
6 years agoExplorer
How to move Player in Hand tracking
How to do the movement of a player while using hand tracking in the oculus quest? Anyone have done Player movement? Have tried to move OVRCameraRig with joystick four-button forward/backward/left/rig...
Stimmits
6 years agoExplorer
modhdhruv said:
Thanks, @Stimmits for your efforts. :)
Perfectly moving as I expecting.
Have you tried OVRPlayerController instead of OVRCameraRig?
When using PlayerController have an issue regarding PanelHMDFollower.cs script. I'm using the PanelHMDFollower script for a button to keep nearby OVRCameraRig. But when use PlayerController it moves automatically in any direction when scene load.
Great! I'm using OVRCameraRig as part of my own player rig setup. But as I mentioned, there are many alternatives to moving your player around. I'm glad you figured it out.
Btw; when you are planning to use pinch gestures or pointer/raycast functionality for the hand-tracking, you have to translate the Pointer position and rotation to use the player rig reference location as well in your situation.
It's this part in Hand.cs:
// this part:
_pointer.PointerPosition = _currentState.PointerPose.Position.FromFlippedZVector3f();
_pointer.PointerOrientation = _currentState.PointerPose.Orientation.FromFlippedZQuatf();
// change to:
_pointer.PointerPosition = transform.TransformPoint(_currentState.PointerPose.Position.FromFlippedZVector3f());
Quaternion rotation = _currentState.PointerPose.Orientation.FromFlippedZQuatf();
_pointer.PointerOrientation = Quaternion.LookRotation(transform.TransformDirection(rotation * Vector3.forward), transform.TransformDirection(rotation * Vector3.up));I hope @Oculus fixes this world to local hassle soon in their SDK, otherwise we'll find ourselves changing all these lines over and over again when they push an update to the SDK.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 2 years ago