How to transform Global minetest directions on "x" and "z" to local directions ? I know there are two object functions that I can get the yaw and lookdir of the player . But since I am not good in mathemathics : I don't understand how to do it with "get_look_dir()" couse it returns a unit vector witch I don't know how to handle . I have an idea how to do it with "get_look_yaw()" but minetest debug console tells me different values for yaw then the function "get_look_yaw()".
My concept is to move player forward programaticly dependent on the direction he faces , becouse when I move on the "x" axis with "moveto()" function I will be going in the same direction no matter where the player is facing .