netfox icon indicating copy to clipboard operation
netfox copied to clipboard

using TickInterpolator to interpolate rotation results in a stutter during the transition between -3.14 and 3.14

Open ruguysgoingtrickortreating opened this issue 1 year ago • 1 comments

As the title says. Recording provided (note the rotation printed to the output)

https://github.com/user-attachments/assets/14d0de0f-d875-4a45-ad98-92d676351215

possible workaround found: interpolate the whole transform, not the rotation and position

Hi @ruguysgoingtrickortreating,

This stems from the way rotation works - it's the amount of rotation per axis, in Euler angles. Using Euler angles to interpolate rotations doesn't work well, as can be seen on the video. The same thing happens in animation software as well, when you try to interpolate with Euler angles.

Interpolating the whole transform works well, or alternatively, you can interpolate quaternion, which will only affect the rotation. The quaternion field also represents the node's rotation, just like rotation, but as a Quaternion, which is much better suited to interpolation.

elementbound avatar Aug 19 '24 18:08 elementbound

This is good info, would this fit in the docs?

Done.

elementbound avatar Nov 02 '24 13:11 elementbound