The C# code defines a hero class that inherits from MonoBehaviour, gets a Rigidbody2D component in Start, and resets velocity to zero and applies an upward force when colliding with an object tagged as 'platform'.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
7 views1 page
Unity 2D Hero Jump Script
The C# code defines a hero class that inherits from MonoBehaviour, gets a Rigidbody2D component in Start, and resets velocity to zero and applies an upward force when colliding with an object tagged as 'platform'.