Skip to content

Commit 26c2ef6

Browse files
committed
Theta now <= ground angle max.
1 parent 2ce801d commit 26c2ef6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Nu/Nu/Physics/PhysicsEngine2d.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ type [<ReferenceEquality>] PhysicsEngine2d =
548548
PhysicsEngine2d.getBodyContactNormals bodyId physicsEngine
549549
|> Array.filter (fun normal ->
550550
let theta = normal.V2.Dot Vector2.UnitY |> acos |> abs
551-
theta < Constants.Physics.GroundAngleMax)
551+
theta <= Constants.Physics.GroundAngleMax)
552552

553553
static member private getBodyToGroundContactNormalOpt bodyId physicsEngine =
554554
match PhysicsEngine2d.getBodyToGroundContactNormals bodyId physicsEngine with

Nu/Nu/Physics/PhysicsEngine3d.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ type [<ReferenceEquality>] PhysicsEngine3d =
160160

161161
// track body ground collisions
162162
let theta = contactNormal.Dot Vector3.UnitY |> acos |> abs
163-
if theta < Constants.Physics.GroundAngleMax then
163+
if theta <= Constants.Physics.GroundAngleMax then
164164
match physicsEngine.BodyCollisionsGround.TryGetValue bodyId with
165165
| (true, collisions) -> collisions.[body2Id] <- contactNormal
166166
| (false, _) -> physicsEngine.BodyCollisionsGround.[bodyId] <- dictPlus HashIdentity.Structural [(body2Id, contactNormal)]

0 commit comments

Comments
 (0)