- 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.