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.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.DropItemRpcclears 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.
ComputePenetrationdoes not support the non-convex mesh colliders used by this game's world geometry, so aClosestPointfallback was added. - Landings no longer sink into terrain. The
*NonAllocscene queries do not skip a collider the cast shape already overlaps; they return a degenerate hit withdistance=0,point=(0,0,0)andnormal=-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 ownPSC_Embeddeddoes it: withqueriesHitBackfaceson, 26 rays from the shape's center. Unlike the game, only the nearest hit is used to tell "center inside" from "center outside", because*NonAllocdoes 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
sleepThresholdsemantics. - Chess pieces, mandrakes, beehives and cactus balls no longer pin their landing ring to the wall they
first touch. These items have no
OnCollisionEnterand simply keep rolling; they now simulate to rest. EventOnItemCollisiononly 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,maxDepenetrationVelocityandmaxLinearVelocityare 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
UniversalAdditionalCameraDatacomponent; 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.boundsis 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
Interactionexactly: 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
Updatehas 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.cfgto regenerate it. - Observer position and width are now resolution independent: leave
Observer X/Ynegative to anchor the window to the bottom-right corner with the 1920x1080 margins, andObserver widthis 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.backpackTypewith 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.
