I’ve been posting the the course Q&A and trying different things, but my lack of intuitive math skills is really starting to let me down and frustrate me.
Based on some code in a similar thread I’m trying to get this to work:
//Roll
float roll;
float targetRoll = xThrow * controlRollFactor;
float currentRoll = transform.localEulerAngles.z;
float rollDelta = Mathf.DeltaAngle(currentRoll,targetRoll);
print(rollDelta);
roll = Mathf.Lerp(currentRoll, rollDelta, .1f);
//Rotate
transform.localRotation = Quaternion.Euler(pitch, yaw, roll);
However it keeps flipping my plane a full 180.
Similar code I used previously was spinning the ship a full 360 so it is getting better… but I’d love some help.