b2RayCastCallback
b2RayCastCallback
Box2D.DynamicsInheritance: System.Object
Constructors
b2RayCastCallback()
b2RayCastCallback()()
Methods
ReportFixture(b2Fixture, b2Vec2, b2Vec2, float)
System.Single ReportFixture(b2Fixture, b2Vec2, b2Vec2, float)(Box2D.Dynamics.b2Fixture fixture, Box2D.Common.b2Vec2 point, Box2D.Common.b2Vec2 normal, System.Single fraction)
Called for each fixture found in the query. You control how the ray cast proceeds by returning a float: return -1: ignore this fixture and continue return 0: terminate the ray cast return fraction: clip the ray to this point return 1: don't clip the ray and continue
Parameters:
fixture
(Box2D.Dynamics.b2Fixture) - the fixture hit by the raypoint
(Box2D.Common.b2Vec2) - the point of initial intersectionnormal
(Box2D.Common.b2Vec2) - the normal vector at the point of intersectionfraction
(System.Single)Returns:
System.Single
- -1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continueExample