I’m trying to add a way to move the character and rotate but when rotating the movement is still moving in the same direction so depending on what way you turn the movement is weird.
few things I see with this.
but to answer your question about movement, it’s because you are only setting the velocity relative to the world. you’re not taking it’s current Hedding into account.
Basically what you need is a forward vector to define what is forward, then you move the object along that forward vector by some value.
But also, generally you’d want to use Move instead of set velocity also. But dono. depends on your game and what you’re lookin’ to do.
Here we can see how TRANSFORM.GetForward is multiplied (with generic multiply) with the W Keypress before getting multiplied again by the sensitivity. Here I’m using Add Relative Force.
Note that this does not do any delta time calculations to smooth movement independent of framerate
2 Likes