- Edited
I've seen examples of this posted around on using things like look_at() and even some rotation maths but it seems that none of them really do what I'm thinking of specifically. I want to have the Z origin.basis of my node pointing towards where it is moving. I tried using various rotation and look_at() methods for this but they were either too generalised with the axis so that would mean my node would wobble or point all over the place as it was moving and trying to find the target which is to be expected because the X and Z axis rotations were screwing up the behaviour. I tried just having the Y axis pointing towards my vector 3 but of course that just had it point directly at the co-ordinates it was travelling to rather than having it point forward along the path it was travelling.
What's the best way to approach this? The specific example I'm dealing with is to try and have my navmesh agent always pointing forward in the direction it's travelling, don't know why it's proving to be a bit of a fussy thing to implement in Godot but here I am again lol. There are some snippets I've seen posted of this rotation behaviour being used in 2D but not much on the 3D front.