
UltimatePrediction
All-in-one landing prediction for PEAK: real-time trajectory, landing point, collider box and effect radius previews for throwables, backpacks, the rope cannon, chain launcher and explosives, plus a picture-in-picture landing observer.UltimatePrediction
All-in-one landing prediction for PEAK. Real-time previews of the landing point, final collider box, effect radius, and rope/chain shape for throwables, backpacks, the rope cannon, the chain launcher, and explosives.
- Game: PEAK (Unity 6 / Mono / BepInEx 5)
- Mod ID:
com.zhuanban.peak.ultimateprediction
Installation
- Install BepInExPack for PEAK.
- Put
plugins/UltimatePrediction.dllinto the game'sBepInEx/plugins/folder. - Launch the game. On first run a config file is created at
BepInEx/config/com.zhuanban.peak.ultimateprediction.cfg.
Features
Throwable landing prediction
| Item | What is predicted |
|---|---|
| Magic Bean | Landing point, growth normal, vine length and final collider box (climbable / non-climbable coloring) |
| Cloud Fungus | Break point and cloud platform landing, using the game's real "speed + time" break condition |
| Bounce Fungus | Break point, bounce platform landing and orientation |
| Shelf Fungus | Break point, shelf landing and orientation |
| Warp Fungus | Flight path and the teleport landing inside the game's time window |
| Remedy Fungus | Break point and healing radius |
| Dynamite | Final position (fuse time considered) and explosion radius |
| Anti-Zooka / Healing Dart | Raycast hit point and trajectory |
| Basketball / Warpsketball | Instant: first-impact landing. Precise: fully simulated real bounce to rest (Warpsketball shows the teleport point when a terrain hit triggers the warp) |
Chess pieces (all C_*) |
Landing point and collider box |
| Backpack / Fannypack | Landing point and collider box (instant = first impact, precise = full simulation to rest) |
| Other special throwables | Any item with a break/spawn / stick / on-collision effect gets a generic landing point + collider box preview |
Rope cannon / chain launcher / raycast launchers
- Rope cannon: while holding the precise-preview key (default right mouse), replays a full real shot using the game's own rope prefab and real joint chain: the anchor flies out, the rope is spawned on arrival, then segments are spooled out frame by frame. Rope shape is decided by dozens of joints, so only the precise mode is offered.
- Chain launcher: while using it (left mouse) shows the landing point, length and real sag.
- Raycast launchers (Anti-Zooka, Healing Dart): while using them shows the exact hit point and trajectory.
Two prediction modes
① Instant analytic prediction (shown automatically while charging, recomputed every frame, ~0.2–2 ms)
- Analytic ballistic integration matching PhysX, with swept-shape casts against the real scene; sweeps give perfect CCD and never tunnel through thin geometry.
- Cast shape follows the real collider type (spheres / capsules / boxes are exact); convex meshes use a "support-point ray" to find the exact first contact.
- Contact response aligned with PhysX (material combine,
bounceThreshold, contactOffset, static/dynamic friction). - Zero-copy, zero-bake, no physics scene is created, so there is no stutter.
② Precise physics preview (hold the precise-preview key, default right mouse; takes 1–2 s)
- Spawns a real rigidbody probe in the main scene (a clone of the item prefab with all logic components stripped, keeping the real colliders and materials) and runs the whole trajectory on the game's own PhysX — identical to the game.
- No artificial limits: no time cap, no bounce-count cap, no artificial speed threshold. It simulates until the item truly comes to rest (PhysX sleep), or is consumed by the game (break / plant / warp / fuse), or is destroyed out of bounds — always by the game's own rules.
- Same zero-copy/zero-bake approach; the cost is that it must run in real time.
- Coexists with the game's right mouse: with a "usable on friend" item (e.g. Cure-All) aimed at a teammate, right mouse is given back to the game for teammate use and the precise preview yields, so the two never fight.
Landing observer (picture-in-picture)
Throwables show a small window in a screen corner with a dedicated camera focused on the landing point, so it stays readable when a held item or terrain blocks the view.
- The view adapts to the landing normal: slightly down onto walls, from above onto floors, from below onto ceilings.
- The camera distance to the landing point is constant; when the line of sight is blocked it changes the angle instead of zooming, and direction hysteresis plus a target dead-zone keep the picture stable.
- In precise mode the window tracks the probe ghost so you can watch it mid-flight.
- Hold the position modifier (default right
Alt) to move the window with the arrow keys and resize it with+/-; the same modifier shows a placeholder window even without a prediction. You can also edit X/Y in the config (negative = auto bottom-right).
Configuration
Config file: BepInEx/config/com.zhuanban.peak.ultimateprediction.cfg
- Section 1 – General: master switch, preview transparency, hide held item while previewing.
- Section 2 – Visuals: trajectory line, landing marker, collider box, result ghost, radius preview, color boost, range screen overlay, colors and pulse speed.
- Section 3 – Items: per-item switches, raycast-launcher prediction, generic throwables prediction.
- Section 4 – Rope & Chain: rope preview transparency, chain preview color.
- Section 5 – Advanced: debug log, enable precise physics preview, precise-preview key (default right mouse).
- Section 6 – Landing Observer: toggle, window width and position, camera distance / elevation / FOV, position modifier key.
Multiplayer safety
- All predictions are local visuals: no network data is sent and no game state is modified.
- Instant analytic prediction only performs read-only physics queries and creates no physics objects.
- The precise probe is a local rigidbody with collisions ignored pairwise against the world (rolled back on destroy); preview objects have all networking/registration components stripped and leak no memory.
Known limitations
- Instant analytic prediction is most accurate for the first impact; use the precise physics preview when you need exact results.
- Frisbee and Glider have non-parabolic flight and no placement effect, so they are not predicted.
- In-game randomness cannot be predicted exactly; previews use a deterministic approximation.
- The precise physics preview runs in real time (~1–2 s) and uses the charge and aim from the moment the key was pressed.
Credits
Inspired by the community mods MagicPreview, CloudAndBounceFungusPrediction and RopePreview, but fully re-implemented and greatly extended.