How do I fix the direction of a projectile?
MichaelSilliman
Member Posts: 31
So I'm making a shoot em up game, where a spaceship has to defend a planet, and I made an invisible wall that automatically shoots bullets every 3 seconds towards the planet. However, It shoots the opposite direction. I made it so it shoots to the left (towards the planet) and it shoots to the right? How do i fix this?
Best Answer
-
3itg Posts: 382Make the bullets as I described, then rotate the actor that is firing them.
You can also change the "Direction" option on the spawn behavior.
You could use something like random(0,359.9)
Answers
Need Help? Email Me | Templates | Full Game Source Code
you can make the value relative to scene, instead of to the actor or vice versa...
but... It sounds like you made it so it shoots right, and it shoots right, so its right.
I am pretty sure if you make it so it shoots left, it will.
To accomplish this, I usually make my bullets move by using the move behavior, direction Zero, relative to actor, then I rotate the object firing it to shoot in the direction I desire.