Slide
Slides down slopes too steep to stand on. Steep ground becomes a fast way down instead of a wall.
Sliding down a slope too steep to stand on, or sliding along the floor after crouching at a run. Steep ground stops being a wall and becomes a fast way down.
SlideHow it works
An action of Walking. Starts from any state, on: Crouch while moving, or a steep floor. Ends when it slows on level ground, then Crouch and the Walking mode.
Happens on: jump in a belly slide (rollout), from Slide. Its flight forbids pounds and hanging.
Slide: sliding down a floor too steep to walk on, as in classic 3D platformers. It starts on a floor past its class's slide angle (Surface Classes) when the character faces downhill, moves backwards or stands still, and when another module asks for it (a ground pound landing there). On ground too steep to stand on, up to maxSlideAngle, it always slides; steeper than that, the character falls. Pressing crouch while walking starts a crouch slide with the same physics, which runs out on flat ground into a crouch, and in its first moments allows a Long Jump. Facing within 90 degrees of downhill it is a butt slide, feet first; otherwise a belly slide. Jumping out of a butt slide is a jump at the slide's speed; out of a belly slide, a low rollout.
The velocity is free to point anywhere along the slope. Each 1/30 s, the original's frame, the slope pushes it downhill and friction keeps a share of it (both from the ground's surface class); the stick steers it a little and changes that share slightly. Speeds are stepped in the original's frames, so they match its slide speeds exactly: 9.3 m/s on a normal 20 degree slope. It stops once the floor no longer counts as a slope for its class and the speed is low. Fast slides on steep floors bounce off walls. Numbers from the classic 3D platformer study (D33).
Combine it
- Needs: Surface Classes. The Inspector warns while one is missing.
- Priority 17: when several states could run, the highest priority wins (see How modules combine).
- Jump rank 35: when a jump starts, the highest-ranked shape that applies chooses its launch.
- Body facing: works with characters whose body faces States.
- Used by the presets: Retro Platformer, Modern Platformer.
Properties
| Property | Description | Range | Default |
|---|---|---|---|
| Character | The character this module belongs to. Drag its Character Motor here. | None | |
| Crouch Slide Speed | Pressing crouch while walking at least this fast starts a crouch slide, m/s. | 0 or more | 0.3 |
| Crouch Slide Kept | Share of a crouch slide's speed kept every 1/30 s on flat ground. 0: the surface class's slide friction. | 0 to 1 | 0 |
| Crouch Slide Stop Speed | A crouch slide stops below this speed, m/s. 0: Stop Speed. | 0 or more | 0 |
| Crouch Slide Boost | A crouch slide starts at this share of the speed it came in with (modern 3D platformers: 1.2). | 0 or more | 1 |
| Max Slide Angle | Ground too steep to stand on is still slid on up to this angle, degrees; steeper is fallen down. | 0 to 90 | 73 |
| Stop Speed | A slide on a floor that is no longer a slope stops below this speed, m/s. | 0 or more | 1.35 |
| Steer Rate | How fast a full sideways stick turns the slide, degrees per second. | 0 or more | 86 |
| Facing Turn Rate | How fast the body turns to face along the slide, degrees per second. | 0 or more | 84 |
| Stick Kept | Share added to the kept speed per 1/30 s by a full stick along the slide (taken away pulling back). | 0 to 0.1 | 0.02 |
| Speed Limit | Fastest slide, m/s. | 0 or more | 33.75 |
| Wall Bounce Kept | A fast slide on a steep floor bounces off a wall keeping this share of its speed. | 0 to 1 | 0.9 |
| Rollout Speed | Upward speed of the rollout out of a belly slide, m/s. | 0 or more | 10.8 |