# How do I use local axes for "set physics linear velocity"?

**URL:** <https://forums.unrealengine.com/t/how-do-i-use-local-axes-for-set-physics-linear-velocity/480174>\
**Category:** World Creation\
**Tags:** unreal-engine, global, vector, Physics, velocity, projectile, question\
**Created:** [March 12, 2021, 1:50pm UTC](https://forums.unrealengine.com/t/how-do-i-use-local-axes-for-set-physics-linear-velocity/480174 "2021-03-12T13:50:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GamerAwesome949](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GamerAwesome949](https://forums.unrealengine.com/u/GamerAwesome949)\
**Post date:** [March 12, 2021, 1:50pm UTC](https://forums.unrealengine.com/t/how-do-i-use-local-axes-for-set-physics-linear-velocity/480174/1 "2021-03-12T13:50:37Z")

</div>

So I have an enemy that shoots a little projectile at me. In the projectile bp, I have BeginPlay → SetObjectRotation (to look at me) → Set PhysicsLinearVelocity 900 on X. However, it is using the global x instead of the actor’s local x. How do I make it simply move forward?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 12, 2021, 1:57pm UTC](https://forums.unrealengine.com/t/how-do-i-use-local-axes-for-set-physics-linear-velocity/480174/2 "2021-03-12T13:57:45Z")

</div>

> SetObjectRotation (to look at me) →   
> Set PhysicsLinearVelocity 900 on X

To get actor’s facing rotation in the world:

![332232-screenshot-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/9/f/49f3039d641b4b6f5c9c107b5c5bf2c914fd3f5f.jpeg)

You probably don’t even need to make rotation. Forward vector should be enough, you can then multiply it by a float to give it velocity.

---

<div class="post-metadata">

**Author:** ![GamerAwesome949](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GamerAwesome949](https://forums.unrealengine.com/u/GamerAwesome949)\
**Post date:** [March 12, 2021, 2:02pm UTC](https://forums.unrealengine.com/t/how-do-i-use-local-axes-for-set-physics-linear-velocity/480174/3 "2021-03-12T14:02:55Z")

</div>

I have get look at rotation so that the character is “forward” but I never would have thought to multiply by a float. Thank you!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 12, 2021, 2:06pm UTC](https://forums.unrealengine.com/t/how-do-i-use-local-axes-for-set-physics-linear-velocity/480174/4 "2021-03-12T14:06:36Z")

</div>

Essentially, forward (right & up vectors, too) is a direction, it’s normalised - with a length of 1. By scaling it, you give it magnitude.

* * *

Very similar to the other thing, I’ve just replied to:

> **[How to make Projectile rotate towards new direction after bounce](https://forums.unrealengine.com/questions/1017180/how-to-make-projectile-rotate-towards-new-directio.html)**
>
> Im having trouble getting my projectile to rotate to the correct angle after bouncing.

---

<div class="post-metadata">

**Author:** ![GamerAwesome949](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GamerAwesome949](https://forums.unrealengine.com/u/GamerAwesome949)\
**Post date:** [March 13, 2021, 1:51am UTC](https://forums.unrealengine.com/t/how-do-i-use-local-axes-for-set-physics-linear-velocity/480174/5 "2021-03-13T01:51:25Z")

</div>

Thank you!
