Case Status
Log In


Home ยป Samples»M2H Jump Game»M2H Jump Game, User Input Fsm
Community Wiki

M2H Jump Game, User Input Fsm

Moves the player left and right with the user Input.

This FSM exposes the Speed variable in the inspector. Modify it to speed up or down the player movement sideways.

This is a one state FSM because we constantly check for the user input.
  1. We reset the x velocity to avoid noise and unwanted drifting.
  2. We get the delta time and multiply it by the speed and user input to find out by how much we need to translate the gameObject.
  3. We translate the gameObject.

Last modified on 5/9/2012 10:39 AM by User.

  • RSS Feed