Finish implementing jumping and landing

This commit is contained in:
2026-08-26 21:32:54 +02:00
parent 21a5170dbc
commit a857a3c814
12 changed files with 285 additions and 55 deletions
+3
View File
@@ -134,6 +134,9 @@ impl FGSegment2d {
let t = (s2_x * (p0_y - p2_y) - s2_y * (p0_x - p2_x)) / denom;
if s >= FGWide::ZERO && s <= FGWide::ONE && t >= FGWide::ZERO && t <= FGWide::ONE {
if self.left_normal().dot(rhs.point2() - rhs.point1()) >= FGi32::ZERO {
return None;
}
Some(FGVec2::new(
FGi32::from_num(p0_x + t * s1_x),
FGi32::from_num(p0_y + t * s1_y),