# Can't get projectiles to move in -X axis

**URL:** <https://forums.unrealengine.com/t/cant-get-projectiles-to-move-in-x-axis/305098>\
**Category:** World Creation\
**Tags:** projectilemovement, unreal-engine, projectile, UE4, question, CPP\
**Created:** [January 27, 2015, 4:08am UTC](https://forums.unrealengine.com/t/cant-get-projectiles-to-move-in-x-axis/305098 "2015-01-27T04:08:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Architekt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Architekt](https://forums.unrealengine.com/u/Architekt)\
**Post date:** [January 27, 2015, 4:08am UTC](https://forums.unrealengine.com/t/cant-get-projectiles-to-move-in-x-axis/305098/1 "2015-01-27T04:08:03Z")

</div>

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:

```
FVector FireDirection(-1.0f, 0.0f, 0.0f);
const FRotator FireRotation = FireDirection.Rotation();
FVector SpawnLocation = GetActorLocation() + socket_transform.GetLocation();
World->SpawnActor(MyProjectileClass, &SpawnLocation, &FireRotation);

```

“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.

---

<div class="post-metadata">

**Author:** ![Architekt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Architekt](https://forums.unrealengine.com/u/Architekt)\
**Post date:** [January 28, 2015, 12:06am UTC](https://forums.unrealengine.com/t/cant-get-projectiles-to-move-in-x-axis/305098/2 "2015-01-28T00:06:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KyoKazehaya](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kyokazehaya/32/1145420_2.png) [@KyoKazehaya](https://forums.unrealengine.com/u/KyoKazehaya)\
**Post date:** [August 22, 2018, 1:09pm UTC](https://forums.unrealengine.com/t/cant-get-projectiles-to-move-in-x-axis/305098/3 "2018-08-22T13:09:01Z")

</div>

Thank you! I was trying to create a Transform with the Rotation and Location parameters and then apply a Velocity to the projectile later and it was causing odd behavior when trying to shoot in the -X axis. Removing the rotation from the transform solved the issue for me!
