Essential 2D Platformer Controller: Movement, Health & Physics
A downloadable asset pack
Buy Now$2.00 USD or more
UNITY 6 Script (Unity 2023.3+). Stop reinventing the wheel! 🛑 This asset contains a robust, production-ready PlayerController2D script, designed for accurate and responsive platformer games. Save hours of programming with a solution that already solves the most annoying 2D physics problems.
✨ Main Features:
🏃 Advanced Movement:
- Walking and Running (Sprint with Shift).
- Jump with adjustable physics.
- Coyote Time: Allows the player to jump fractions of a second after leaving a platform (essential for good "Game Feel").
🧱 Physics and Smart Collision:
- Precise Ground Detection: Uses Double Raycast (left and right foot) to avoid collision bugs at ledges.
- Moving Platform Support: The script automatically detects moving platforms and "sticks" the player to them so they don't slide off.
⚔️ Combat and Life System:
- Integrated Health System: Complete logic for damage and death.
- Hearts HUD: Automatically updates the UI (Full Heart/Empty Heart).
- Invincibility (iFrames): Player flashes and becomes invulnerable after taking damage.
🔊 Built-in Audio Manager:
- Footstep sounds (synchronized with movement).
- Jump and Damage sounds.
📦 What's included:
- 1x Clean and commented C# Script (PlayerController2D.cs).
- UI Logic for Restart Screen.
Note: This script uses the new rb.linearVelocity API, optimized for Unity 6.
Purchase
Buy Now$2.00 USD or more
In order to download this asset pack you must purchase it at or above the minimum price of $2 USD. You will get access to the following files:
PlayerController2D.cs 8.7 kB

Leave a comment
Log in with itch.io to leave a comment.