Nez.Portable/Physics/Physics.cs
/// <summary>
/// casts a line from start to end and returns the first hit of a collider that matches layerMask
/// </summary>
/// <param name="start">Start.</param>
/// <param name="end">End.</param>
/// <param name="layerMask">Layer mask.</param>
casts a line from start to end and returns the first hit of a collider that matches layerMask
casts a line from start to end and returns the first hit of a collider that matches layerMask
public static RaycastHit linecast(Vector2 start, Vector2 end, int layerMask = allLayers)
        {
            _hitArray[0].reset();
            linecastAll(start, end, _hitArray, layerMask);
            return _hitArray[0];
        }
public static RaycastHit linecast ( Vector2 start , Vector2 end , int layerMask = allLayers ) { _hitArray [ 0 ] . reset ( ) ; linecastAll ( start , end , _hitArray , layerMask ) ; return _hitArray [ 0 ] ; }
casts a line from start to end and returns the first hit of a collider that matches layerMask
casts a line from start to end and returns the first hit of a collider that matches layerMask
// cleanse the collider before proceeding
start
Vector2
None
end
Vector2
None
layerMask
int
None