Another way to choose the destination for our Sphere-arrow GameObject is by the user clicking on an object on the screen, and then the Sphere-arrow GameObject moving to the location of the clicked object:
Point-and-click move to object
Getting ready
This recipe adds to the first recipe in this chapter, so make a copy of that project folder and do your work for this recipe with that copy.
How to do it...
To create an object-based point-and-click mini-game, do the following:
- In the Inspector, add the Player Tag to the Sphere-arrow GameObject.
- Delete the two 3D Cubes and...