Spawn volume
A random spawn can sound easy to handle; however, you will soon see how hard it can be to achieve a not-so-random result. We have a huge map with static objects and a three-dimensional environment. We want to find a random point at a fixed distance from the object above it in the whole game map that is not in a mesh, or in the middle of the floor, or high in the sky.
Components
Let's proceed step by step. First, create a new Blueprint class by extending an Actor class. Change the default root component to a Box Collision component. This will be the bounds volume that is used to calculate the random point.
No other components are needed for this class. The representation, when placed in the level, is like any other volume; a fully transparent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access