How do I rotate a character along with the controls? (3D; Simple)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Butterbean115

I couldn’t find anything else on the subject, and to an extent therefore I’ve simply just decided to get help here instead, so that’s why I’m asking this specific question right now right here. Also, this is for 3D.

I’ve been trying to do so with my character for some time, and so far, nothing’s worked, and thinking about it just wrecks my brain. Basically, I need to know how to rotate the character based on the WASD keys, which is what I’m using right now, and this works by when you press a WASD key, the character rotates in the correct direction according to what direction key was pressed, including diagonals, and the character won’t return to its original rotation in that case, if you haven’t realized yet.

I would prefer for this to work via my move_vec variable which is a Vector3, which was what I was trying to make use of, but your solution is yours to give me. Also, since I’m a amateur to Godot, I want this answer to be a simple one for me, but again, it’s ultimately up to you which answer you give me. Thanks.

what your describing that you can already do ^ is what i’m trying to do could you please show me your script for it, ive been trying to get my character to face direction of movement.

markelliot_94 | 2020-03-16 16:46

:bust_in_silhouette: Reply From: ovendelon

Seems you need to orient your character to a direciton vector:
Check this tutorial