# Math help needed : moving an object to the way/angle it is facing?

for now i am moving an actor along a single axis(x/y/z) by simply increasing x/y/z value of it’s location.
But this type of calculation does not consider actor’s face direction.

most probably face direction can be found by as actor’s forward vector.
but i dont know who to modify it so that actor’s transform update toward’s that direction.

So the ultimate question is :
how to moving an object to the way/angle it is facing ?

Edit:
here is a video:

In the video u will see that at the beginning that ring was facing forward(towards y axis) so it’s movement was ok.
here i just was increasing it’s y axis value.
But later after rotating it ,it should move towards floor.
but it still was moving along y axis.

i need a way so that it will work on both cases.

If you want to move your actor forward along its facing X direction you could try:

here is a video:

In the video u will see that at the beginning that ring was facing forward(towards y axis) so it’s movement was ok. here i just was increasing it’s y axis value. But later after rotating it ,it should move towards floor. but it still was moving along y axis.

i need a way so that it will work on both cases.

Did you try what I suggested above? It should do exactly what are you are describing.

Yes. I tried .but no success.
Most probably I put it on wrong place.
Give some more time to test it out.
I will upload a video once I get back to home.

You could also try “Add relative location” and always add to X only. Then as it rotates the relative forward direction changes automatically without having to add it.