Ejemplo n.º 1
0
 // Token: 0x06001B96 RID: 7062 RVA: 0x00090A7E File Offset: 0x0008EC7E
 public static bool Raycast(VRTK_CustomRaycast customCast, Ray ray, out RaycastHit hitData, LayerMask ignoreLayers, float length = float.PositiveInfinity, QueryTriggerInteraction affectTriggers = QueryTriggerInteraction.UseGlobal)
 {
     if (customCast != null)
     {
         return(customCast.CustomRaycast(ray, out hitData, length));
     }
     return(Physics.Raycast(ray, out hitData, length, ~ignoreLayers, affectTriggers));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// The Raycast method is used to generate a raycast either from the given CustomRaycast object or a default Physics.Raycast.
 /// </summary>
 /// <param name="customCast">The optional object with customised cast parameters.</param>
 /// <param name="ray">The Ray to cast with.</param>
 /// <param name="hitData">The raycast hit data.</param>
 /// <param name="ignoreLayers">A layermask of layers to ignore from the raycast.</param>
 /// <param name="length">The maximum length of the raycast.</param>
 /// <returns>Returns true if the raycast successfully collides with a valid object.</returns>
 public static bool Raycast(VRTK_CustomRaycast customCast, Ray ray, out RaycastHit hitData, LayerMask ignoreLayers, float length = Mathf.Infinity)
 {
     if (customCast != null)
     {
         return(customCast.CustomRaycast(ray, out hitData, length));
     }
     else
     {
         return(Physics.Raycast(ray, out hitData, Mathf.Infinity, ~ignoreLayers));
     }
 }