- Add OVRPlayerController prefab to scene.
- Add the Character Controller Constraint component to the OVRPlayerController game object.
- Attach the camera from the OVRPlayerController game object to the Character Controller Constraint component.
- Check Dynamic Height on the Character Controller Constraint component.
- Change Tracking Origin on the OVRCameraRig to Floor Level.
- Move OVRPlayerController to a position where it won't fall through the floor.
- Change the radius of the Character Controller on OVRPlayerController to
0.25
so you can walk closer to objects before bumping into them.
- Add OVRControllerPrefab to both LeftControllerAnchor and RightControllerAnchor game objects in the OVRCameraRig.
- Change the Controller dropdown on each controller to
L Touch
andR Touch
respectively.
- Add the OVRGrabber component to both OVRControllerPrefab game objects.
- Disable Use Gravity and enable Kinematic on the Rigidbody component that was added with the OVRGrabber component.
- Check Parent Held Object to make the object grabbed a child of the controller. This prevents having to update the position of the object to match the controller.
- Set the Grip Transfrom to the game object the component is attached to.
- Add a Sphere Collider with a size of
0.075
, set Is Trigger totrue
, and add it to the Grab Volumes array.
- Add the OVRGrabbable component to anything you want to be grabbable.
- Also, attach a Rigidbody if you want the grabbable object to react to physics after it has been released.
Thanks! That step by step guide is the best documentation I have found on setting up grabbing with the controllers and that SDK. Tried the script, but it needs to be updated. By the way, setting the TrackingOriginType on the Camera Rig to Floor makes the auto-height calibration function properly on that SDK. That way the capsule collider doesn't need to be scaled up.
Thanks in advance if posting an update to that script. I would say "should work at Oculus", but that company is sadly gone...not going to say "should work at farsebook" to anybody I like.