public override float ReportFixture(b2Fixture fixture, b2Vec2 point, b2Vec2 normal, float fraction) { if ((fixture.GetFilterData().categoryBits & _CollisionMask) == 0) { return(-1f); } ICollider collider = _Physics2DControl.GetPhysicsObject(fixture.GetBody().GetUserData().data).GetCollider(fixture.GetUserData().data); return(_Callback.Invoke(collider, point.ToVector2(), normal.ToVector2(), fraction)); }
public override bool ReportFixture(b2Fixture fixture) { if ((fixture.GetFilterData().categoryBits & _CollisionMask) == 0) { return(true); } ICollider collider = _Physics2DControl.GetPhysicsObject(fixture.GetBody().GetUserData().data).GetCollider(fixture.GetUserData().data); return(_Callback.Invoke(collider)); }