Ejemplo n.º 1
0
 /// <summary>Performs a sweep into the scene using a sphere and returns the closest found hit, if any.</summary>
 /// <param name="sphere">Sphere to sweep through the scene.</param>
 /// <param name="unitDir">Unit direction towards which to perform the sweep.</param>
 /// <param name="hit">Information recorded about a hit. Only valid if method returns true.</param>
 /// <param name="layer">Layers to consider for the query. This allows you to ignore certain groups of objects.</param>
 /// <param name="max">
 /// Maximum distance at which to perform the query. Hits past this distance will not be detected.
 /// </param>
 /// <returns>True if something was hit, false otherwise.</returns>
 public static bool SphereCast(Sphere sphere, Vector3 unitDir, out PhysicsQueryHit hit, ulong layer = 18446744073709551615, float max = 3.40282347E+38f)
 {
     return(Internal_sphereCast(ref sphere, ref unitDir, out hit, layer, max));
 }
Ejemplo n.º 2
0
 private static extern Collider[] Internal_sphereOverlap(ref Sphere sphere, ulong layer);
Ejemplo n.º 3
0
 private static extern bool Internal_sphereOverlapAny(ref Sphere sphere, ulong layer);
Ejemplo n.º 4
0
 private static extern PhysicsQueryHit[] Internal_sphereCastAll(ref Sphere sphere, ref Vector3 unitDir, ulong layer, float max);
Ejemplo n.º 5
0
 private static extern bool Internal_sphereCastAny(ref Sphere sphere, ref Vector3 unitDir, ulong layer, float max);
Ejemplo n.º 6
0
 private static extern bool Internal_sphereCast(ref Sphere sphere, ref Vector3 unitDir, out PhysicsQueryHit hit, ulong layer, float max);
Ejemplo n.º 7
0
 /// <summary>Checks if the provided sphere overlaps any other collider in the scene.</summary>
 /// <param name="sphere">Sphere to check for overlap.</param>
 /// <param name="layer">Layers to consider for the query. This allows you to ignore certain groups of objects.</param>
 /// <returns>True if there is overlap with another object, false otherwise.</returns>
 public static bool SphereOverlapAny(Sphere sphere, ulong layer = 18446744073709551615)
 {
     return(Internal_sphereOverlapAny(ref sphere, layer));
 }
Ejemplo n.º 8
0
 /// <summary>Returns a list of all colliders in the scene that overlap the provided sphere.</summary>
 /// <param name="sphere">Sphere to check for overlap.</param>
 /// <param name="layer">Layers to consider for the query. This allows you to ignore certain groups of objects.</param>
 /// <returns>List of all colliders that overlap the sphere.</returns>
 public static Collider[] SphereOverlap(Sphere sphere, ulong layer = 18446744073709551615)
 {
     return(Internal_sphereOverlap(ref sphere, layer));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Performs a sweep into the scene using a sphere and checks if it has hit anything. This can be significantly more
 /// efficient than other types of cast* calls.
 /// </summary>
 /// <param name="sphere">Sphere to sweep through the scene.</param>
 /// <param name="unitDir">Unit direction towards which to perform the sweep.</param>
 /// <param name="layer">Layers to consider for the query. This allows you to ignore certain groups of objects.</param>
 /// <param name="max">
 /// Maximum distance at which to perform the query. Hits past this distance will not be detected.
 /// </param>
 /// <returns>True if something was hit, false otherwise.</returns>
 public static bool SphereCastAny(Sphere sphere, Vector3 unitDir, ulong layer = 18446744073709551615, float max = 3.40282347E+38f)
 {
     return(Internal_sphereCastAny(ref sphere, ref unitDir, layer, max));
 }
Ejemplo n.º 10
0
 private static extern void Internal_getBounds(IntPtr thisPtr, out Sphere __output);