O'Reilly logo

Unreal Engine Game Development Blueprints by Nicola Valcasara

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required