Пример #1
0
 // Token: 0x06001B97 RID: 7063 RVA: 0x00090AA6 File Offset: 0x0008ECA6
 public static bool Linecast(VRTK_CustomRaycast customCast, Vector3 startPosition, Vector3 endPosition, out RaycastHit hitData, LayerMask ignoreLayers, QueryTriggerInteraction affectTriggers = QueryTriggerInteraction.UseGlobal)
 {
     if (customCast != null)
     {
         return(customCast.CustomLinecast(startPosition, endPosition, out hitData));
     }
     return(Physics.Linecast(startPosition, endPosition, out hitData, ~ignoreLayers, affectTriggers));
 }
Пример #2
0
 /// <summary>
 /// The Linecast method is used to generate a linecast either from the given CustomRaycast object or a default Physics.Linecast.
 /// </summary>
 /// <param name="customCast">The optional object with customised cast parameters.</param>
 /// <param name="startPosition">The world position to start the linecast from.</param>
 /// <param name="endPosition">The world position to end the linecast at.</param>
 /// <param name="hitData">The linecast hit data.</param>
 /// <param name="ignoreLayers">A layermask of layers to ignore from the linecast.</param>
 /// <returns>Returns true if the linecast successfully collides with a valid object.</returns>
 public static bool Linecast(VRTK_CustomRaycast customCast, Vector3 startPosition, Vector3 endPosition, out RaycastHit hitData, LayerMask ignoreLayers)
 {
     if (customCast != null)
     {
         return(customCast.CustomLinecast(startPosition, endPosition, out hitData));
     }
     else
     {
         return(Physics.Linecast(startPosition, endPosition, out hitData));
     }
 }