how to make my character look allways to the movement direction?
My problem with this groups of nodes is that when i am going foward (w) and i press other key while holding w the character change the rotation so i can still going foward but facing to other direction.
So, how can i make my character allways look to the direction he is moving??
asked Jun 09 '17 at 12:23 AM in Blueprint Scripting
Try storing the current position in a variable called OldPos. This is a vector. Then, every tick you get the new position NewPos and do this:
FaceDirVec = NewPos - OldPos
Then you can use the get look at rotation with NewPos as the Start input and NewPos + FaceDirVec as the Target input. The returning rotator will be correct and you can use it to set the pawn rotation.
answered Jun 09 '17 at 12:29 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here