How do I spawn actors in random directions?
SLOCM3Z
Member Posts: 797
Hello,
I was wondering if there is a random spawn number in spawn actor. What I want to happen is when my bullet collides with wall do spawn actor in random directions towards player. So when the bullet hits the wall I want one rubble piece to go towards the player and up, another towards the player and straight towards him, and another towards player and headed downwards. I would like some help.
Thanks
Comments
Hey @jdlcrater,
Quick question, do these rubble pieces do anything or are they simply an added aesthetic look to your game???
There is no random spawn number you will have to create it. Use the vectorToAngle function to establish the direction to the heroes centre and use the random() function for ranges based on the angle.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
To @KillerPenguinStudios
They are for when a bullet hits a wall. Rubble and stuff falls off
@jdlcrater,
Just make an animation and spawn the actor and play animation when needed
Oh. Thanks