Need help scripting a lerp function for transform rotations

Godot version 3.5
The code of the function

My code interpolates correctly up until you go 360 degrees and the code interpolates inverse to the next rotation. I need the code to not go inverse when you go 360 degrees it should just keep going with it’s interpolation and I don’t know how to do that. Can someone please help me out here? :worried:

Both, Quaternions and Basis have a slerp function, you might need to use one of those.

2 Likes

omg thank you for telling me about that I didn’t know that there was already functions for that it works perfectly now thank you!