Many games make use of spawn points and waypoints. This recipe demonstrates choosing a random spawn point, and then the instantiation of an object at that chosen point.
Choosing destinations – finding a random spawn point
Getting ready
This recipe builds upon the previous recipe. So, make a copy of this project, open it, and then follow the steps in the next section.
How to do it...
To find a random spawn point, follow these steps:
- In the Scene panel, create a sphere (by navigating to Create | 3D Object | Sphere) sized as (1, 1, 1) at (2, 2, 2) position, and apply...