- Home /
Spline-based rotation
Hi,
I have a path for camera to follow. This path is constructed by several nodes. These nodes creates a path by the help of spline calculation. These nodes also holds a quaternion property for the rotation of the camera.
Here is the problem. I can move the camera along this spline very smooth, however i can not create a smooth rotation along these nodes. Quaternion.Lerp and Quaternion.Slerp is not usefull in here even i smooth the time property of these functions with Mathf.smoothStep. They create un-usefull easings. I have tried to calculate the rotations by spline alghorithm but that does not work also. Because it rotates the camera in the wrong direction for 355 to 0 rotation (it counts down from 355 to 0, but it should count up from 355 to 0)
It is a little complex, i hope i have explained it right =) Looking forward for your help.
Thanks,
Your answer
