private void UpdateCurrentDegreesHeading()
    {
        mover.TeleportRotation(mover.GetRotation().Approach(
                                   angleTarget, angleChangePerSecond * timeScale.DeltaTime()));

        /*
         *  UtilApproach.AngleDegrees(mover.GetRotation(),
         *  targetDegrees, degreeChangePerSecond * timeScale.DeltaTime()));
         */
    }
Esempio n. 2
0
    private void FixedUpdate()
    {
        float rotationDelta = rotationSpeed * Time.deltaTime;

        mover.OffsetRotation(rotationDelta);

        if (mover.GetRotation() >= rotationMax)
        {
            mover.TeleportRotation(rotationMin);
        }
    }
Esempio n. 3
0
 private void FixedUpdate()
 {
     // Update the GameObject's angle.
     mover.TeleportRotation(mover.GetRotation().ApproachCoterminal(
                                angleTarget, angleChangePerSecond * timeScale.DeltaTime()));
 }