Esempio n. 1
0
    private void FixedUpdate()
    {
        velocityTransformed = upDirection.SpaceEnter(velocityReader.GetVelocity());
        switch (directions)
        {
        case Directions.Horizontal:
            RotateHorizontal();
            break;

        case Directions.Vertical:
            RotateVertical();
            break;

        case Directions.Both:
            RotateHorizontal();
            RotateVertical();
            break;
        }
    }
Esempio n. 2
0
 // Retrieves the GameObject's velocity relative to up space.
 public Vector2 GetVelocity()
 {
     return(upDirection.SpaceEnter(mover.GetVelocity()));
 }
Esempio n. 3
0
 private void FixedUpdate()
 {
     rotator.SetAngle(Angle.FromHeadingVector(mover.GetVelocity()));
     //UtilHeading2D.DegreesFromHeadingVector(mover.GetVelocity()));
 }