Grind Rail
1. What it does
A spline the hero lands on and rides at 1029 cm/s. Jump hops on the rail, stick sideways plus Jump transfers to a nearby rail, Slide hangs under it, the end launches the hero. The camera follows the bend. Rails catch a walking hero too, not only a falling one.
2. Turn on / off
- Details: Corridor | Abilities > Can Grind Rail.
- Blueprint:
Set Ability Enabled(Ability = Grind Rail) /Is Ability Enabled. - Routes: A only with the kit's movement component or ALS (a rail is scenery on a plain Character Movement) - B yes - C yes.
- Switched off during a ride: the hero leaves the rail (a transfer in flight is cancelled). Switched off before: the hero passes the rail. "Rails but no hang": untick Hang Enabled on the rail instead; that is a per-rail setting, not an ability.
3. Level actor to place
Corridor Grind Rail (ACorridorGrindRail): draw its spline. Corridor Rail Obstacle (ACorridorRailObstacle): a box on a rail; its Type says what passes it (must jump, must hang, must transfer, ...).
4. Details fields
On the rail (Corridor | Rail):
| Field | Default | What it does |
|---|---|---|
Speed (Speed) |
1029 | Riding speed along the rail (cm/s). (Details: Corridor | Rail) |
End Launch Speed (EndLaunchSpeed) |
1800 | Launch speed off the end of the rail, forward (cm/s). (Details: Corridor | Rail) |
Jump Speed (JumpSpeed) |
900 | The hop on the rail (upward speed, cm/s), at plain gravity. (Details: Corridor | Rail) |
Capture Radius (CaptureRadius) |
90 | The line this close sideways gets the hero on: against its legs (walking, rising, falling), or under its feet by up to this much while coming down. (Details: Corridor | Rail) |
Hang Drop (HangDrop) |
82 | Hanging: the hero's middle this far under the line (cm). 82 puts the wrists of the hang clip (64 cm over the capsule centre) on a 12 cm rail - measured in PIE; another character's clip may want another value. (Details: Corridor | Rail) |
Ride Sink (RideSink) |
10 | Riding: the hero this much lower than standing on the line (the grind clip lifts the feet ~10 cm - measured in PIE). (Details: Corridor | Rail) |
Hang Enabled (bHangEnabled) |
true | Lets the slide button hang the hero under the rail while riding. Off: no hanging on this rail. (Details: Corridor | Rail) |
No Hang Near End (NoHangNearEnd) |
411 | No hanging this close to the end of the rail (cm). (Details: Corridor | Rail) |
Transfer Range (TransferRange) |
1029 | Another rail this close (cm) takes a transfer jump. (Details: Corridor | Rail) |
Transfer Time (TransferTime) |
0.75 | Time a transfer jump to another rail takes (s). (Details: Corridor | Rail) |
Rail Camera (bRailCamera) |
true | The camera rides the rail behind the hero (the rail-follow camera: the hero's Rail Camera settings, or this rail's own). (Details: Corridor | Rail) |
Override Camera (bOverrideCamera) |
false | Use this rail's own rail-follow camera (Camera Settings) instead of the hero's (Camera Director > Rail Camera). Needs Rail Camera on. (Details: Corridor | Rail) |
Camera Settings (CameraSettings) |
- | This rail's rail-follow camera, used with Override Camera. (Details: Corridor | Rail) |
Curve Lean Radius (CurveLeanRadius) |
600 | Riding a curve this tight (radius, cm) leans the hero fully into it; wider curves lean less. 0 = no lean from curves (the stick still leans). (Details: Corridor | Rail) |
Curve Bank Angle (CurveBankAngle) |
12 | Degrees the body banks into a curve at full lean (riding only; it eases out near the rail's end). 0 = stays upright. (Details: Corridor | Rail) |
Tightest Curve Radius (TightestCurveRadius) |
read only | Measured from the line: the tightest curve's radius seen from above (cm; 0 = straight). (Details: Corridor | Rail) |
Peak Turn Rate (PeakTurnRate) |
read only | Measured from the line: how fast the heading turns there at Speed (deg/s). Over 150 the rail camera's Max Turn Rate holds the view back on that curve; widen the curve or lower Speed. (Details: Corridor | Rail) |
Both Ways (bBothWays) |
false | Off: always rides the way the line is drawn (the obstacles are laid out for one direction). On: rides the way the hero was going along it when it got on. (Details: Corridor | Rail) |
Rail Radius (RailRadius) |
12 | Thickness of the rail tube (radius, cm); the line is its top. (Details: Corridor | Rail) |
On the hero (Corridor | Traversal): Rail Hit Extent, Rail Hit Up, Traversal Fx.
5. Blueprint functions and events
| Node | Kind | What it does |
|---|---|---|
| Set Ability Enabled / Is Ability Enabled | Function / Getter | The switch above (Ability = Grind Rail). |
| Get Corridor Action | Getter | Grind Rail while riding (ride, hop, transfer, climbing back up), Rail Hang while hanging under it. |
| On Action Started / Ended | Event dispatchers | One pair per ride; Rail Hang is its own pair. |
| Get Rail State (movement component) | Getter | Ride, hop, transfer, hang ... |
| Get Rail Ride Lean / Get Rail Curve Lean / Get Rail Bank (movement component) | Getters | The lean and bank of the body, for your own pose. |
| Get Rail Lean (movement component) | Getter | The stick's lean alone, -1 left to 1 right. |
| Get Hang Blend (movement component) | Getter | 0 riding on top to 1 hanging under the rail. |
| Get Rail Swing (movement component) | Getter | Degrees the body swings about the rail while hanging. |
6. Use your own animation
Leave Anim Set empty; Get Corridor Action = Grind Rail / Rail Hang; blend ride and hang with Get Hang Blend, lean with Get Rail Lean, swing with Get Rail Swing.
7. See it in the demo
Course4_RideChase: the curvy rails at the start. Walk or jump onto the first rail.
8. Pitfalls
- A level whose only way over a pit is a rail is impassable when Grind Rail is off.
- Rail obstacles only affect a hero that is on the rail.
- The rail camera engages only while riding; camera views you placed "above / below" the rail are only reached then.
- Riding a rail breaks crates in the hero's path.