How can I rotate the player using a vector3s like Vector3.FORWARD , BACK, LEFT AND RIGHT

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

I was following a tutorial about grid movement and they are using unity of course not everything is plug and play but this section confused me he used
:transform.localEularAngles = current_dir

current_dir being one of the vector3.Forward etc, so whats a better way of setting the rotation, thanks!

:bust_in_silhouette: Reply From: Wakatta

Godot Doc (try saying that 3 times fast) advises that you avoid using Euler Angles and for good reasons too. in fact i think that guy’s method was pretty good for the century he was in but not by today’s (You’ll never be able to fly a plane accurately using them).

This probably directly answers your question

Spatial.set_rotation_degrees(Spatial.get_rotation_degrees() + Vector3.FORWARD)

But learn the Godot approved way first and also have a look at the Basis and Quat sections

Maybe I didn’t say it directly, but I was asking for godots way of doing it though I did find another way and did that instead, thanks anyways!

Dragon20C | 2021-03-13 07:52