CMCharacter Modules 0.1.0

Platform Riding

Kind: Modifier · Add Component: Character Modules > Modifiers > Platform Riding

Carries the character on moving platforms and keeps their speed on a jump off. Lifts and ferries just work.

Carries the character on moving and turning platforms, and lets it keep the platform's speed when it jumps off. Lifts, ferries and turning discs work without special code.

Inspector
▼Platform Riding⋮
CharacterCharacter (Character Motor)
Turn With PlatformOn ▾
Keep MomentumOn ▾
The Platform Riding component in the Inspector, with its defaults.
Origin. Quake's movers (1996) carry the player; Unreal's based movement keeps momentum.

How it works

Changes every state: carried by moving platforms.

Platform Riding: the character moves with whatever it stands on. At the end of every step it remembers where its feet are in the space of the object under them; at the start of the next it puts them back on that spot, wherever the object has moved or turned to since. Any moving collider works, whatever moves it: a script, an Animator, Timeline, a kinematic Rigidbody. The platform needs nothing added to it.

Options: turn the view with a turning platform, and keep the platform's velocity when leaving it (momentum, as most modern games do; classic arena shooters did not).

Combine it

  • Needs: Ground Sensor. The Inspector warns while one is missing.
  • Used by the presets: Arena Shooter, Competitive Shooter, Surf, Retro Platformer, Modern Platformer, Traversal Adventure, Action RPG.

Properties

PropertyDescriptionRangeDefault
CharacterThe character this module belongs to. Drag its Character Motor here.None
Turn With PlatformTurn the view and the character with a platform that turns.On
Keep MomentumKeep the platform's velocity when jumping or walking off it.On

Additional resources