decentraland / decentraland/godot-explorer
Locomotion Iteration #2: Glide Parameter & Wind Response Parity
- Dominant language
- Rust
- Stars
- 18
- Forks
- 19
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 43
Description
## **⚠️ Problem:**
Godot refuses to open the glider below 1 m of altitude where Unity opens at 0.2 m, and enforces a 3× longer re-open cooldown — gliding around rooftops and ledges fails on mobile and works on desktop. Drives **Playtime**.
## **🏁 Scope:**
Glide parameter alignment and wind response in `player.gd`, plus a product call on the trigger model. Two of the three are single-constant changes.
## **📝 Deliverables:**
- [ ] Min ground distance 1.0 → 0.2 (B5)
- [ ] Glide cooldown 0.6 → 0.2 (B6)
- [ ] Wind response 1.5 applied to glide velocity (M12)
- [ ] Glide-open gate no longer swallows a jump press inside the coyote window — coordinate with #1557
- [ ] Trigger model decision recorded: keep mobile toggle-press, or move to Unity's hold-to-glide
- [ ] Rooftop and low-ledge glide open / close / re-open captured side-by-side vs desktop
- [ ] Regression: max fall speed 1.0, horizontal cap 6.0, jump→glide interval 0.5 unchanged
## Metrics
Playtime. No instrumented baseline — measure via the #905 reproduction checklist (B5/B6: open the glider below 1 m of altitude, then close and re-open quickly; Unity opens at 0.2 m and re-arms in 0.2 s).
## Findings
| | Godot `main` | Unity |
|---|---|---|
| Max fall speed | 1.0 (`player.gd:14`) | 1 (`ApplyGliding.cs:55`) ✓ |
| Horizontal speed cap | 6.0 (`player.gd:15`) | GlideSpeed 6 (`CalculateSpeedLimitSystem.cs:36`) ✓ |
| Min ground distance | 1.0 (`player.gd:16`) | 0.2 (settings :84) |
| Jump → glide interval | 0.5 (`player.gd:17`) | 0.5 (settings :87) ✓ |
| Glide cooldown | 0.6 (`player.gd:18`) | 0.2 (settings :88) |
| Trigger model | toggle-press; walking off a ledge can open glide — deliberate divergence, comment in `player.gd` | hold-to-glide after air jumps exhausted |
| Wind response | none | GlideWindResponse 1.5 (`ApplyExternalForce.cs:29`) |
Four of seven parameters already match. B5 and B6 are two-constant fixes with immediate playability impact around rooftops and ledges.
## Notes
D7 open — trigger model. The divergence is deliberate and documented in `player.gd`: mobile has no hold gesture equivalent to desktop's. Keep the toggle, or match desktop? The ledge-walk-opens-glide behavior is also what eats coyote-time jump inputs (B1), so the call interacts with #1557.
## **🔗 References:**
- [#1861](https://github.com/decentraland/godot-explorer/issues/1861), [#1886](https://github.com/decentraland/godot-explorer/pull/1886) — Godot double jump + glide implementation and its `Gliding_Start/Idle/End` states; the constants to change live there
- [#8622](https://github.com/decentraland/unity-explorer/issues/8622) — desktop `disableJump` / `DoubleJump` / `Glide` truth table (`1-high`, closed); the intended gating contract
- [`ApplyGliding.cs`](https://github.com/decentraland/unity-explorer/blob/dev/Explorer/Assets/DCL/Character/CharacterMotion/Velocity/ApplyGliding.cs) — glide fall speed + trigger conditions; `ApplyExternalForce.cs` beside it carries wind response
- [#1557](https://github.com/decentraland/godot-explorer/issues/1557) — coyote fix; the glide-open gate is what eats the jump input today
- [#905](https://github.com/decentraland/godot-explorer/issues/905) — parent audit, §3.3
Contributor guide
Assessment
This issue has not been assessed yet.