hello,
i realized that i need another quaternion to save the rotation and then calculate the degree cap but well unity crashed again :I
var diff = lookAtPos - go.transform.position;
if (diff != Vector3.zero && diff.sqrMagnitude > 0)
{
desiredRotation = Quaternion.LookRotation(diff, upVector.IsNone ? Vector3.up : upVector.Value);
}
currentRotation = Quaternion.Slerp(lastRotation, desiredRotation, speed.Value * Time.deltaTime); //crash here so i guesss its m calculation below
float angle = Quaternion.Angle (lastRotation, currentRotation);
float MaxAngle = MaxDegrees.Value * Time.deltaTime;
if (angle > MaxAngle) {
currentRotation = Quaternion.Slerp (lastRotation, currentRotation, MaxAngle / angle);
}
go.transform.rotation = currentRotation;