Skip to main content

Ready to market your stellar app?

Samsung Developer Program is your gateway to app monetization success.

Learn More

Samsung Developer Program

Step 2: Add a Raycaster to the Camera

 

In this step you add a raycaster to the camera.

For other steps in this exercise, see Exercise 4: Add Functionality.

 

To add a raycaster to the camera:

  1. From Unity, open the Main.unity file.

 

  1. From the Hierarchy view, select the Main Camera object. 

 

  1. Select Create > Create Empty Child.

 

  1. From the Inspector view, change the name of the empty object to Raycaster.

 

  1. Click the Add Component button and select Scripts > Raycaster. This will allow you to cast a ray at a target.

 

 

  • Was this article helpful?