Ejemplo n.º 1
0
 void UpdateColliderVisible(bool visible)
 {
     if (visible)
     {
         if (!inScene)
         {
             Application.GetCollisionWorld().Add(this);
             inScene = true;
         }
     }
     else
     {
         if (inScene)
         {
             Application.GetCollisionWorld().Remove(this);
             inScene = false;
         }
     }
 }
Ejemplo n.º 2
0
 static public bool SphereCast(Ray ray, float r, out RaycastHit hitInfo, float distance, int layerMask)
 {
     return(Application.GetCollisionWorld().Raycast(ray, out hitInfo, distance, layerMask));
 }
Ejemplo n.º 3
0
 static public RaycastHit[] RaycastAll(Ray ray, float distance = Mathf.Infinity, int layerMask = DefaultRaycastLayers)
 {
     return(Application.GetCollisionWorld().RaycastAll(ray, distance, layerMask));
     //return RaycastAll (ray.origin, ray.direction, distance, layerMask);
 }
Ejemplo n.º 4
0
 static public bool Raycast(Ray ray, out RaycastHit hitInfo, float distance = Mathf.Infinity, int layerMask = DefaultRaycastLayers)
 {
     return(Application.GetCollisionWorld().Raycast(ray, out hitInfo, distance, layerMask));
 }