예제 #1
0
 private static extern bool Internal_CapsuleCastAny(ref Capsule capsule, ref Quaternion rotation, ref Vector3 unitDir, ulong layer, float max);
예제 #2
0
 private static extern bool Internal_CapsuleCast(ref Capsule capsule, ref Quaternion rotation, ref Vector3 unitDir, out ScriptPhysicsQueryHit hit, ulong layer, float max);
예제 #3
0
 private static extern ScriptPhysicsQueryHit[] Internal_CapsuleCastAll(ref Capsule capsule, ref Quaternion rotation, ref Vector3 unitDir, ulong layer, float max);
예제 #4
0
 /// <summary>
 /// Returns a list of all colliders in the scene that overlap the provided capsule.
 /// </summary>
 /// <param name="capsule">Capsule to check for overlap.</param>
 /// <param name="rotation">Orientation of the capsule.</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[] CapsuleOverlap(Capsule capsule, Quaternion rotation, ulong layer = ulong.MaxValue)
 {
     return ConvertColliders(Internal_CapsuleOverlap(ref capsule, ref rotation, layer));
 }
예제 #5
0
 /// <summary>
 /// Checks if the provided capsule overlaps any other collider in the scene.
 /// </summary>
 /// <param name="capsule">Capsule to check for overlap.</param>
 /// <param name="rotation">Orientation of the capsule.</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 CapsuleOverlapAny(Capsule capsule, Quaternion rotation, ulong layer = ulong.MaxValue)
 {
     return Internal_CapsuleOverlapAny(ref capsule, ref rotation, layer);
 }
예제 #6
0
 /// <summary>Returns a list of all colliders in the scene that overlap the provided capsule.</summary>
 /// <param name="capsule">Capsule to check for overlap.</param>
 /// <param name="rotation">Orientation of the capsule.</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 capsule.</returns>
 public static Collider[] CapsuleOverlap(Capsule capsule, Quaternion rotation, ulong layer = 18446744073709551615)
 {
     return(Internal_capsuleOverlap(ref capsule, ref rotation, layer));
 }
예제 #7
0
 /// <summary>
 /// Performs a sweep into the scene using a capsule and checks if it has hit anything. This can be significantly 
 /// more efficient than other types of cast* calls.
 /// </summary>
 /// <param name="capsule">Capsule to sweep through the scene.</param>
 /// <param name="rotation">Orientation of the capsule.</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 CapsuleCastAny(Capsule capsule, Quaternion rotation, Vector3 unitDir,
     ulong layer = ulong.MaxValue, float max = float.MaxValue)
 {
     return Internal_CapsuleCastAny(ref capsule, ref rotation, ref unitDir, layer, max);
 }
예제 #8
0
 private static extern bool Internal_capsuleOverlapAny(ref Capsule capsule, ref Quaternion rotation, ulong layer);
예제 #9
0
        /// <summary>
        /// Performs a sweep into the scene using a capsule and returns the closest found hit, if any.
        /// </summary>
        /// <param name="capsule">Capsule to sweep through the scene.</param>
        /// <param name="rotation">Orientation of the capsule.</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 CapsuleCast(Capsule capsule, Quaternion rotation, Vector3 unitDir,
            out PhysicsQueryHit hit, ulong layer = ulong.MaxValue, float max = float.MaxValue)
        {
            ScriptPhysicsQueryHit scriptHit = new ScriptPhysicsQueryHit();
            if(Internal_CapsuleCast(ref capsule, ref rotation, ref unitDir, out scriptHit, layer, max))
            {
                ConvertPhysicsQueryHit(ref scriptHit, out hit);
                return true;
            }

            hit = new PhysicsQueryHit();
            return false;
        }
예제 #10
0
 private static extern bool Internal_capsuleCastAny(ref Capsule capsule, ref Quaternion rotation, ref Vector3 unitDir, ulong layer, float max);
예제 #11
0
 private static extern Collider[] Internal_capsuleOverlap(ref Capsule capsule, ref Quaternion rotation, ulong layer);
예제 #12
0
 private static extern PhysicsQueryHit[] Internal_capsuleCastAll(ref Capsule capsule, ref Quaternion rotation, ref Vector3 unitDir, ulong layer, float max);
예제 #13
0
 private static extern bool Internal_capsuleCast(ref Capsule capsule, ref Quaternion rotation, ref Vector3 unitDir, out PhysicsQueryHit hit, ulong layer, float max);
예제 #14
0
 /// <summary>Checks if the provided capsule overlaps any other collider in the scene.</summary>
 /// <param name="capsule">Capsule to check for overlap.</param>
 /// <param name="rotation">Orientation of the capsule.</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 CapsuleOverlapAny(Capsule capsule, Quaternion rotation, ulong layer = 18446744073709551615)
 {
     return(Internal_capsuleOverlapAny(ref capsule, ref rotation, layer));
 }
예제 #15
0
 private static extern NativeCollider[] Internal_CapsuleOverlap(ref Capsule capsule, ref Quaternion rotation, ulong layer);
예제 #16
0
 /// <summary>
 /// Performs a sweep into the scene using a capsule and returns all found hits.
 /// </summary>
 /// <param name="capsule">Capsule to sweep through the scene.</param>
 /// <param name="rotation">Orientation of the capsule.</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>List of all detected hits.</returns>
 public static PhysicsQueryHit[] CapsuleCastAll(Capsule capsule, Quaternion rotation,
     Vector3 unitDir, ulong layer = ulong.MaxValue, float max = float.MaxValue)
 {
     return ConvertPhysicsQueryHits(Internal_CapsuleCastAll(ref capsule, ref rotation, ref unitDir, layer, max));
 }
예제 #17
0
 private static extern bool Internal_CapsuleOverlapAny(ref Capsule capsule, ref Quaternion rotation, ulong layer);
예제 #18
0
 /// <summary>
 /// Performs a sweep into the scene using a capsule and checks if it has hit anything. This can be significantly more
 /// efficient than other types of cast* calls.
 /// </summary>
 /// <param name="capsule">Capsule to sweep through the scene.</param>
 /// <param name="rotation">Orientation of the capsule.</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 CapsuleCastAny(Capsule capsule, Quaternion rotation, Vector3 unitDir, ulong layer = 18446744073709551615, float max = 3.40282347E+38f)
 {
     return(Internal_capsuleCastAny(ref capsule, ref rotation, ref unitDir, layer, max));
 }