Class SingleHitCallback
java.lang.Object
com.deco2800.game.physics.raycast.SingleHitCallback
- All Implemented Interfaces:
RayCastCallback
public class SingleHitCallback extends java.lang.Object implements RayCastCallback
Cast a ray against all colliders that match the layermask. The closest hit will be stored, or
none if no hit occurred.
-
Field Summary
Fields Modifier and Type Field Description boolean
didHit
RaycastHit
hit
short
layerMask
-
Constructor Summary
Constructors Constructor Description SingleHitCallback()
-
Method Summary
Modifier and Type Method Description float
reportRayFixture(Fixture fixture, Vector2 point, Vector2 normal, float fraction)
-
Field Details
-
Constructor Details
-
SingleHitCallback
public SingleHitCallback()
-
-
Method Details
-
reportRayFixture
- Specified by:
reportRayFixture
in interfaceRayCastCallback
-