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.
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
| Property | Description | Range | Default |
|---|---|---|---|
| Character | The character this module belongs to. Drag its Character Motor here. | None | |
| Turn With Platform | Turn the view and the character with a platform that turns. | On | |
| Keep Momentum | Keep the platform's velocity when jumping or walking off it. | On |