O'Reilly logo

Virtual Reality Blueprints by John Williamson, Charles Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making objects grabbable

Our carnival midway is progressing nicely and with a teleporting function in place, the scene is becoming a fulfilling VR experience. In this next step, we will build the functions that make it possible to pick up and swing the matter for the Wacky Moles game and throw softballs in the Milk Bottle Toss game. If you have experience with the OVRGrabber and OVRGrabble scripts, feel free to implement the function and move on to the next section.

Follow along if this is your first time using these scripts:

  1. Drill down to the TrackingSpace of the items in the OVRPlayerController prefab, as shown in Figure 7.18.
  2. Right-click on the LeftHandAnchor and choose 3D Object | Sphere. Rename the sphere LeftGrabber and set its scale ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required