Esempio n. 1
0
            public float RayCastCallback(RayCastInput input, int proxyId)
            {
                object        userData = broadPhase.GetUserData(proxyId);
                Fixture       fixture  = (Fixture)userData;
                RayCastOutput output;

                fixture.RayCast(out output, ref input);

                if (output.Hit)
                {
                    float fraction = output.Fraction;
                    Vec2  point    = (1.0f - fraction) * input.P1 + fraction * input.P2;
                    return(callback.ReportFixture(fixture, point, output.Normal, fraction));
                }

                return(input.MaxFraction);
            }