PlayerController.cs V2

This version of PlayerController includes code for Animation, and Movement of the player game object.

Required GameObjects:

  • Player with Animator Component, Rigidbody2D, Collider2D

  • GroundCheck: Empty GameObject placed as a child of the Player, transform positioned at the feet of the Player.

  • Floor Empty GameObject with BoxCollider2D, Layer: Ground

CODE: PlayerController.cs

Last updated