File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -750,7 +750,7 @@ and [<ReferenceEquality>] PhysicsEngine2d =
750750 match fixture.Tag with
751751 | :? BodyShapeIndex as bodyShapeIndex ->
752752 if ( int fixture.CollidesWith &&& collisionMask) <> 0 then
753- let report = BodyIntersection.make bodyShapeIndex fraction ( v3 point.X point.Y 0.0 f ) ( v3 normal.X normal.Y 0.0 f)
753+ let report = BodyIntersection.make bodyShapeIndex fraction ( PhysicsEngine2d.toPixelV3 point) ( v3 normal.X normal.Y 0.0 f)
754754 if fraction < fractionMin then
755755 fractionMin <- fraction
756756 closestOpt <- Some report
@@ -759,8 +759,8 @@ and [<ReferenceEquality>] PhysicsEngine2d =
759759 if closestOnly then fraction else 1.0 f)
760760 physicsEngine.PhysicsContext.RayCast
761761 ( callback,
762- Common.Vector2 ( ray.Origin.X , ray.Origin.Y ) ,
763- Common.Vector2 ( ray.Origin.X + ray.Direction.X , ray.Origin.Y + ray.Direction.Y ))
762+ PhysicsEngine2d.toPhysicsV2 ray.Origin,
763+ PhysicsEngine2d.toPhysicsV2 ( ray.Origin + ray.Direction))
764764 if closestOnly then
765765 match closestOpt with
766766 | Some closest -> [| closest|]
You can’t perform that action at this time.
0 commit comments