top of page

Zak Parrish tutorial "Spawn Many Objects Randomly in A Volume"

I tried Zak's tutorial (not with cows though).

The video by Zak Parrish: http://youtu.be/9-7SmkasS_A shows how to spawn many objects in random locations in a volume.

Instead of using a Class reference directly, you could create a named variable SpawnedActor. This would let you use children of this parent to set the variable SpawnedActor to be different classes, using the same parent blueprint graph for many cases.

The actor spawned should incldue a mesh or emitter so you can see it. If you want the spawned actors to fall to the ground from wherever they spawn, you’ll need to set Transform > Mobility > Movable in the spawned actor’s mesh component. Set the mesh component’s properties so it has ticked values for : Simulate Physics and Simulation Generates Hit Events and Generate Overlap Events and Collision Presets = PhysicsActor. You’ll also need to tick Start Awake if it isn’t already. Possibly the ground will need to generate hit events too.

You can use Hit Events to generate sounds on collision, to get the hit location to spawn emitters, and so on. These can be in the spawned actor. You can also operate on the returned object produced by the SpawnActor function’s Return Value, such as add the object to an array.

In the image, a Delay and Gate to control the burst of objects, but you could use keyboard input and Gate it via a tick event or some other way.

In the image the Gate is collapsed to save space (hold G and click to add a Gate).

Featured Posts
Recent Posts
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page