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

Raycasters

When we created the first Canvas for the scene, Unity also added an item called EventSystem. An EventSystem is used to detect where current input events need to be sent and Raycasters provide that information. Think of a Raycaster as a visible laser pointer. When evoked in your scene, the Raycaster sends out a ray which reports the object or objects it has collided with. For our project, we will be using a Graphic Raycaster, but there are also two other types of Raycasters to consider:

  • Graphic Raycaster: Queries all UI elements in a canvas to determine if any item collides with the ray. This type also has a few properties which determine the conditions in which objects can be ignored.
  • Physics 2D Raycaster: Can identify 2D physics ...

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