3D Platformer (Game Feel Prototype)

This is 100% Character Controller.

  • No Rigidbody!
  • No Collider!

It is meant to provide smooth, reliable, predictable gameplay movement, when interacting with the following:

  • Moving / Rotating / Scaling platforms
  • Slopes (even extreme, and sliding down)
  • Overlapping colliders
  • Uneven terrain and messy collider placement (very small gaps, bumps...)
  • Unity's built-in Terrain Collider
  • And every other possible corner case.

THE MAIN IDEA

  1. OverlapCapsule to detect if an object entered the Character space, then ComputePenetration to move away from it (so player can be pushed by incoming platforms and enemies).
  2. Checking if ground position, rotation or scale changed, so the Character can stand on a dynamic platform and follow it.
  3. CharacterController.Move to get to the next position. When walking on ground, we can follow the ground tilt.
  4. SphereCast upward to check if there is something right above and move away from it.
  5. SphereCast downward to check if the Character is grounded, know the ground tilt, and snap to the ground.

CONTROL ASSISTANCE

Coyote Time

Gravity is not applied when you leave a platform, there is a small delay before it kicks in, where you can still jump.

Jump Input Buffer

The Character will remember that you pushed the Jump button for some time, in case you were still mid-air when you pressed it.

JUICINESS / FEEDBACK

  • Acceleration Tilt
  • Jumping & Landing Compression
  • Running/Landing Dust Particles
  • Jump Trail


Leave a comment

Log in with itch.io to leave a comment.