Can't get projectiles to move in -X axis
I must be doing something really dumb because I can make them move in the positive X axis but not negative. I modeled my code on the twin stick shooter. When I fire a projectile, they appear, but they don't move. My UProjectileMovementComponent has its initial and max speeds set to -3000. When I go to spawn one I do:
"socket_transform" is just the transform for the gun where the projectile fires from.
I thought perhaps the problem is setting a negative value for the speeds so I made them positive, thinking that the -1.0f for the X value of FireDirection would lead to it moving in the negative X axis direction but nope, it winds up just moving in the positive X axis.
asked Jan 27 '15 at 04:08 AM in C++ Programming
OK I figured it out. There were 2 issues. One, I stopped using the Speed variables and instead set the velocity variable. When I did that, it was in fact moving but it wasn't visible. Turns out the material I was using on the plane mesh that is my bullet needed to be set up to be two sided. Once I did that, everything works fine, and I was able to just do a SpawnActor without the rotation parameter, as the rotation is controlled by the velocity of the projectile.
answered Jan 28 '15 at 12:06 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here