Spawning actors in a random direction.
tdormanesh
Member, PRO Posts: 10
Hi all,
Kinda new here, tried out GS for mac a while ago and very excited to use it on PC.
My problem seems simple and probably is, I'm just missing something small I bet.
I can't seem to post a screen shot, but I basically want when 2 actors collide, one of em spawns another actor and sends it off in a random direction... Basically chunks flying off. It all works except for the random direction.
I looks something like this:
spawn actor: Chunk
in the direction: random(0,360)
relative to: actor
from position: 0,0
relative to: actor
place: in front of the actor.
The only 2 things I changed was the actor type and the random function, which isn't working.
Also, the chunk has a speed, and apply max speed so it flies off. It just flies off in the same direction every time.
Kinda new here, tried out GS for mac a while ago and very excited to use it on PC.
My problem seems simple and probably is, I'm just missing something small I bet.
I can't seem to post a screen shot, but I basically want when 2 actors collide, one of em spawns another actor and sends it off in a random direction... Basically chunks flying off. It all works except for the random direction.
I looks something like this:
spawn actor: Chunk
in the direction: random(0,360)
relative to: actor
from position: 0,0
relative to: actor
place: in front of the actor.
The only 2 things I changed was the actor type and the random function, which isn't working.
Also, the chunk has a speed, and apply max speed so it flies off. It just flies off in the same direction every time.
Best Answer
-
JohnPapiomitis Posts: 6,256
The direction in the spawn behavior sets the direction the spawned actor will be facing, not moving. The spawn behavior doesnt set any movement on the spawned actor.
P.S. Just curious, why didn't the random work in the spawn actor box?
cheers
Answers
Ohh hey, you have all those cool GS tutorial vids. Those helped me learn GS alot, thanks.
P.S. Just curious, why didn't the random work in the spawn actor box?