01-12-2018, 05:55 PM
I am assuming that your camera is on the spline.
What you want is the sign of the signed angle between the spline tangent and the camera forward.
try this
What you want is the sign of the signed angle between the spline tangent and the camera forward.
try this
Code:
var projectedCameraForward = Vector3.ProjectOnPlane(cameraForward, splineOrientationUp); // You should handle the cases where projectedCameraForward is Vector3.zero;
FluffyUnderware.DevTools.Extensions.Vector3Ext.AngleSigned(projectedCameraForward, splineTangent, splineOrientationUp)
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.