Skip to content

Instantly share code, notes, and snippets.

@markusrt
Created September 25, 2012 19:59
Show Gist options
  • Select an option

  • Save markusrt/3784093 to your computer and use it in GitHub Desktop.

Select an option

Save markusrt/3784093 to your computer and use it in GitHub Desktop.

Revisions

  1. markusrt created this gist Sep 25, 2012.
    11 changes: 11 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    var absoluteAirVelocity = Mathf.Abs(movement.inAirVelocity.x);
    if (absoluteAirVelocity < movement.inAirMinSpeed)
    {
    movement.inAirVelocity = Vector3(Mathf.Sign(h), 0, 0)
    * movement.inAirMinSpeed;
    }
    else if (absoluteAirVelocity > movement.inAirMaxSpeed)
    {
    movement.inAirVelocity = Vector3(Mathf.Sign(h), 0, 0)
    * movement.inAirMaxSpeed;
    }