Hi Folks,

i have a question and i am shure there must be an “easy” answer.

I want to navigate an object by keyboard.

WASD give me forward, backward and sideways movement.

Now i want to be forward the direction the object is looking in.

I can change the objects rotation by left clicking and dragging on the panel.

I know by now that i have to multiply the transform x with the cos of the angle

transform y with the sin of the angle to get the right movement.

This seems to work right for a given rotation. But , everytime i rotate the object, the angle changes and thus cos and sin and thus my x and y position. So the further i am away from the center the more unwanted movement occurs with the rotation…

Navigation3D.toe (7.09 KB)

I know this has been done and is basically vector math but i just can`t seem to wrap my head around and would be very happy if anybody could point me in the right direction!!

Thanks

Stefan