Sunday, April 18, 2010

Walk your Pawn - Follow Up

If like me or Droganis from the UDK forums you would like your pawn to walk by default and only run on a key press, you can use this.

First follow the "Walk Your Pawn" tutorial if you haven't, then in your PlayerController's HandleWalking function, use this so that we only ask the Pawn to run when bRun is set i.e. when Shift is down.

function HandleWalking()
if ( Pawn != None )
Pawn.SetWalking( bRun == 0 );

No comments: