private void UpdateCurrentDegreesHeading() { mover.TeleportRotation(mover.GetRotation().Approach( angleTarget, angleChangePerSecond * timeScale.DeltaTime())); /* * UtilApproach.AngleDegrees(mover.GetRotation(), * targetDegrees, degreeChangePerSecond * timeScale.DeltaTime())); */ }
private void FixedUpdate() { float rotationDelta = rotationSpeed * Time.deltaTime; mover.OffsetRotation(rotationDelta); if (mover.GetRotation() >= rotationMax) { mover.TeleportRotation(rotationMin); } }
private void FixedUpdate() { // Update the GameObject's angle. mover.TeleportRotation(mover.GetRotation().ApproachCoterminal( angleTarget, angleChangePerSecond * timeScale.DeltaTime())); }