So I saw the sample of pathfollowing, but the fact is that the angular speed is to hight. After I the class ConstantAngularSpeedCurve to control the angular speed, but when I use it, the program crash, why ?
For the start I use that :
Code: Select all
var slerpCurve = new QuaternionSlerpCurve();
slerpCurve.ControlPoints.Add(0, Quaternion.Identity);
slerpCurve.PostLoop = CurveEndpointBehavior.Clamp;
orientationPath = new ConstantAngularSpeedCurve(1,slerpCurve);
Code: Select all
var slerpCurve = new QuaternionSlerpCurve();
slerpCurve.ControlPoints.Add(0, turret.Orientation);
slerpCurve.ControlPoints.Add(1, orient);
slerpCurve.PostLoop = CurveEndpointBehavior.Clamp;
orientationPath = new ConstantAngularSpeedCurve(1,slerpCurve);
Thanks