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.
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 ...
Get Unreal Engine Game Development Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.