Exemplo n.º 1
0
        public static bool Fire(Vector3 origin, Vector3 direction, PhysXRaycastHit raycastHit, float distance, PhysXCollider.CollisionLayer layers, uint ignoredVehicleId = 0)
        {
            physXOrigin.FromVector(origin);
            physXDirection.FromVector(direction);
            bool hit = PhysXSceneManager.FireRaycastFiltered(physXOrigin, physXDirection, distance, raycastHit.physXRaycastHit, (uint)layers, 0, 0, ignoredVehicleId);

            if (hit)
            {
                raycastHit.PopulateFields();
            }
            return(hit);
        }
Exemplo n.º 2
0
        public static bool Fire(Vector3 origin, Vector3 direction, PhysXRaycastHit raycastHit, float distance)
        {
            physXOrigin.FromVector(origin);
            physXDirection.FromVector(direction);
            bool hit = PhysXSceneManager.FireRaycast(physXOrigin, physXDirection, distance, raycastHit.physXRaycastHit);

            if (hit)
            {
                raycastHit.PopulateFields();
            }
            return(hit);
        }
Exemplo n.º 3
0
 public static bool Fire(Vector3 origin, Vector3 direction, PhysXRaycastHit raycastHit, PhysXCollider.CollisionLayer layers, uint ignoredVehicleId = 0)
 {
     return(Fire(origin, direction, raycastHit, float.MaxValue, layers, ignoredVehicleId));
 }
Exemplo n.º 4
0
 public static bool Fire(Vector3 origin, Vector3 direction, PhysXRaycastHit raycastHit)
 {
     return(Fire(origin, direction, raycastHit, float.MaxValue));
 }
Exemplo n.º 5
0
 public static void ReleaseRaycastHit(PhysXRaycastHit raycastHit)
 {
     raycastHits.Enqueue(raycastHit);
 }