Fusion icon indicating copy to clipboard operation
Fusion copied to clipboard

Spring simulate 3D rotations more naturally

Open dphfox opened this issue 4 years ago • 3 comments

Currently, to animate the rotational part of a CFrame using spring simulation, we decompose the CFrame into a series of numbers representing it's axis-angle rotation, and spring simulate those numbers. While this works, it doesn't seem like a nice or natural way of doing it, especially since the axis needs to be unitised before being re-assembled into CFrame form.

Is there a better way of doing this? I'm still learning to work my way around quaternions, but I think they'd need to be orthonormalised too. Perhaps the real problem is that we need a new kind of spring for rotations and angles?

dphfox avatar Aug 21 '21 15:08 dphfox

After some consideration and talking around, the way we currently do rotations should suffice, though this would be good to consider further in the future.

dphfox avatar Sep 28 '21 20:09 dphfox

I think it'd be wise to re-open this for v0.3, since CFrame rotations do not currently work correctly for springs (though they are fine for tweens due to lerpType using slerp). We should probably implement this using quaternions, though I'm double-checking to make sure my intuitions are correct.

dphfox avatar Feb 01 '22 09:02 dphfox