diff --git a/crates/skate-game/src/physics/handplant/trajectory.rs b/crates/skate-game/src/physics/handplant/trajectory.rs index 528a7cb0..1e7c983a 100644 --- a/crates/skate-game/src/physics/handplant/trajectory.rs +++ b/crates/skate-game/src/physics/handplant/trajectory.rs @@ -112,11 +112,22 @@ impl Handplant { if hit.contact_time < 0.0 { continue; } - let point = hit.contact_position; //PredictionResults::GetPosition82D2D988. - if self.anchor[1] - point[1] <= 0.5 { + let contact = hit.contact_position; //Admission uses GetPosition82D2D988. + if self.anchor[1] - contact[1] <= 0.5 { continue; } let normal = hit.landing_normal; + //82D66B64..98/82D66BC0..BF8 evaluate the query trajectory at + //contact time for the landing anchor, not the surface contact. + let point = trajectory.position_at(hit.contact_time); + //The host sphere query can return a nearby ledge whose lifted + //landing target lies above the apex. It cannot define a descending + //arc (82D608A0 takes sqrt(2*g*drop)). Keep searching; if none is + //feasible, use the existing native three-second fallback below. + let destination = madd(normal, 0.56, point); + if !destination.iter().all(|v| v.is_finite()) || !(destination[1] < apex[1]) { + continue; + } if normal[1] < 0.71 { selected = Some((point, normal)); break; diff --git a/docs/plants.md b/docs/plants.md index 135b4917..859687a4 100644 --- a/docs/plants.md +++ b/docs/plants.md @@ -63,6 +63,15 @@ an object-scene adapter; this change does not implement those features. The separately logged off-board non-finite follower velocity remains under investigation, with source target values included in diagnostic builds. +The handplant outgoing selector now distinguishes the surface contact used +for admission from the trajectory position at contact time used for the +landing anchor (`82D66B64..98`, `82D66BC0..BF8`). The host query adapter also +rejects lifted landing targets at or above the apex: those cannot produce a +descending `82D608A0` arc and previously reached its negative square root. +It continues the six authored queries and uses the existing three-second +fallback if none is feasible. This feasibility gate is a host query adaptation, +not a claim that the additional gate occurs in TU3. + The task executable is a separate copy, built with: ```powershell