You are viewing a potentially older version of this package. View all versions.
khalil2-UltimatePrediction-1.1.1 icon

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.

By khalil2
Date uploaded 2 weeks ago
Version 1.1.1
Download link khalil2-UltimatePrediction-1.1.1.zip
Downloads 305
Dependency string khalil2-UltimatePrediction-1.1.1

This mod requires the following mods to function

BepInEx-BepInExPack_PEAK-5.4.75301 icon
BepInEx-BepInExPack_PEAK

BepInEx pack for PEAK. Preconfigured and ready to use.

Preferred version: 5.4.75301

README

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

  1. Install BepInExPack for PEAK.
  2. Put plugins/UltimatePrediction.dll into the game's BepInEx/plugins/ folder.
  3. 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.

CHANGELOG

Changelog

2.0.0

Updated for PEAK 3.0.0. This release is about correctness and polish: it fixes a set of landing errors that only showed up in play, makes both prediction modes agree with each other, and rebuilds the icon and all config text.

Fixed: landing accuracy

  • Backpack throws now match the game. CharacterItems.DropItemRpc clears the inherited velocity for backpacks and raises the spawn point by 0.25 m; the mod previously added the player's speed on top, so running throws landed several meters short.
  • Impact timing is rewound to the actual contact moment. The sweep covers a whole segment, but the solver used the segment's end state, which overstated the impact speed by up to 1.3 m/s, reported the impact late, and discarded the remaining flight time of that segment. Multi-bounce landings no longer fall systematically short.
  • Convex mesh impacts now use a two-pass support point cast, so angled hits are no longer reported a whole face late (30-40 cm on backpacks).
  • Wall-adjacent throws no longer pass through terrain. ComputePenetration does not support the non-convex mesh colliders used by this game's world geometry, so a ClosestPoint fallback was added.
  • Landings no longer sink into terrain. The *NonAlloc scene queries do not skip a collider the cast shape already overlaps; they return a degenerate hit with distance=0, point=(0,0,0) and normal=-direction. Those hits used to be discarded, which threw away the only signal that the shape was already touching something, so items sank straight through the ground. They are now collected and resolved the way the game's own PSC_Embedded does it: with queriesHitBackfaces on, 26 rays from the shape's center. Unlike the game, only the nearest hit is used to tell "center inside" from "center outside", because *NonAlloc does not guarantee distance order and reading the wrong hit turns "no penetration behind a plate" into an exit and pushes the item through it. The push then uses the real exit distance plus the shape's own support extent.
  • Slopes no longer report a false rest. The old "normal points up and speed is low" rule was replaced by a static friction cone test plus sleepThreshold semantics.
  • Chess pieces, mandrakes, beehives and cactus balls no longer pin their landing ring to the wall they first touch. These items have no OnCollisionEnter and simply keep rolling; they now simulate to rest.
  • EventOnItemCollision only fires when the other side is an item, so it is no longer treated as a ground impact.

Fixed: precise preview

  • No more passing through teammates and item piles. The probe used to ignore every item, character and rope segment permanently, so precise preview disagreed with both real throws and the instant preview. Static terrain is still solved by PhysX; dynamic objects are now handled by a per-frame sphere sweep that rebounds correctly while never pushing the real object.
  • The frozen ghost no longer blocks the crosshair: its colliders are disabled on finish.
  • Sleep timing now matches the game: sleepThreshold, maxDepenetrationVelocity and maxLinearVelocity are copied from the real item.
  • Rope preview no longer rescans the whole scene once per segment (up to 40 segments per shot).
  • Light, Camera and Projector components are stripped from ghosts. Holding a lantern or torch no longer lights up the landing point.

Fixed: landing observer

  • The observer camera now only gets a UniversalAdditionalCameraData component; no URP option is overridden, so shadows match the main camera.
  • No more clipping through terrain when the target jumps. Large jumps snap, and the rendered position gets a per-frame embedding check.
  • Elevation now matches the config value. The side offset used to be applied after the pitch, so 25° behaved like 22.7° and the 89° limit behaved like 65.8°.
  • Default position is now anchored to the bottom-right corner: the margins are scaled from the 1920x1080 baseline, so the window keeps the same distance from the screen edges on any resolution or aspect ratio. Its width scales with screen height too, with the cap applied in baseline units.
  • The range overlay no longer covers the window when you stand inside an explosion radius.
  • Candidate directions are capped and cached, so a fully blocked view no longer costs 140 physics queries per frame.

Fixed: visuals

  • The collider box now measures real collider geometry instead of silently falling back to the render bounds (the clone is inactive, so Collider.bounds is always empty there).
  • Trajectory width adapts to camera distance instead of being a fixed world size (which produced an 88 px smear up close and a sub-pixel line at range).
  • Radius rings keep a constant world line width instead of scaling with the radius.
  • The landing ring is lifted along the surface normal so terrain no longer clips half of it.
  • The radius sphere is double sided, so standing inside an explosion no longer hides it.
  • Color boost brightens in HSV, preserving saturation.
  • Allocations: the collider box reuses its arrays, the trajectory submits with SetPositions, and the box draws in 6 calls instead of 12.

Fixed: interaction and stability

  • Teammate detection now mirrors Interaction exactly: terrain occlusion, range clipping by the nearest blocker, and exclusion of your own colliders.
  • The secondary-key handoff no longer hardcodes the right mouse button, so rebinding works.
  • Rope cannon and chain previews are throttled instead of rebuilt every frame.
  • Magic bean vine tint has hysteresis, so slope edges no longer flicker.
  • Unlit dynamite no longer shows an airborne explosion point.
  • Raycast launchers use the same fixed-step ray cache as the game.
  • Spectating or a camera override disables launcher prediction.
  • Hiding the held item no longer hides the first-person hands.
  • Material leaks in the chain preview and stale renderer state in the held-item hider were fixed.
  • Config hot reload no longer swallows an external edit that happens right after the mod writes the file.
  • Plugin startup survives a failed Harmony patch instead of going silent, and Update has a top-level guard that reports each distinct exception once.

Changed (breaking)

  • Config keys are now English. Old Chinese keys are no longer read; delete BepInEx/config/com.zhuanban.peak.ultimateprediction.cfg to regenerate it.
  • Observer position and width are now resolution independent: leave Observer X/Y negative to anchor the window to the bottom-right corner with the 1920x1080 margins, and Observer width is interpreted as pixels at 1920x1080.
  • Chess pieces, mandrakes, beehives and cactus balls now simulate to rest in instant mode, so their landing point is farther away but actually correct.
  • Precise preview collides with teammates and items (without pushing them) and is capped at 60 seconds.

1.1.1

  • Backpacks and fannypacks are now covered by throwable prediction, classified by Backpack.backpackType with a prefab-name fallback. Jetpack and Rocketpack are excluded.

1.1.0

  • Fixed a conflict with the game's "use on teammate" action: with a teammate-friendly item aimed at a teammate, the right mouse button is handed back to the game and the precise preview yields.

1.0.0

  • First public release: instant analytic prediction while charging, plus a real-physics probe on a key.
  • Covers magic bean, cloud/bounce/shelf/warp/remedy fungus, dynamite, Anti-Zooka, healing dart, rope cannon, chain launcher and any throwable with a special effect.
  • Landing observer picture-in-picture window with a constant camera distance.