// Interpolate between current and target orientation over the duration public override void Update(double elapsedTime, SpaceCraftBase spaceCraft) { double ratio = (elapsedTime - StartTime) / Duration; spaceCraft.SetRoll(_currentOrientation * (1 - ratio) + _targetOrientation * ratio); }
public override void Finalize(SpaceCraftBase spaceCraft) { spaceCraft.SetRoll(_targetOrientation); }