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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait