C# Class LostPolygon.DynamicWaterSystem.ColliderTools

A collection of functions that work with colliders.
Show file Open project: caffeinatedguy/Limbs Class Usage Examples

Public Methods

Method Description
IsPointAtColliderEdge ( Collider collider, Vector3 point, float tolerance ) : bool

Checks if point is at most tolerance away from the collider edge.

IsPointInsideCollider ( Collider collider, Vector3 point, ColliderSpecificTestEnum specificTest = ColliderSpecificTestEnum.None ) : bool

Checks whether the point is inside a collider.

This method can check against all types of colliders, including TerrainCollider and concave MeshCollider.

IsPointInsideMeshCollider ( Collider collider, Vector3 point ) : bool

Checks whether the point is inside a MeshCollider.

Method Details

IsPointAtColliderEdge() public static method

Checks if point is at most tolerance away from the collider edge.
public static IsPointAtColliderEdge ( Collider collider, Vector3 point, float tolerance ) : bool
collider UnityEngine.Collider /// The collider to check against. ///
point UnityEngine.Vector3 /// Point being checked. ///
tolerance float /// Maximal distance ///
return bool

IsPointInsideCollider() public static method

Checks whether the point is inside a collider.
This method can check against all types of colliders, including TerrainCollider and concave MeshCollider.
public static IsPointInsideCollider ( Collider collider, Vector3 point, ColliderSpecificTestEnum specificTest = ColliderSpecificTestEnum.None ) : bool
collider UnityEngine.Collider /// The collider to check against. ///
point UnityEngine.Vector3 /// The point being checked. ///
specificTest ColliderSpecificTestEnum /// Defines a kind of specific collision test that must be done against . ///
return bool

IsPointInsideMeshCollider() public static method

Checks whether the point is inside a MeshCollider.
public static IsPointInsideMeshCollider ( Collider collider, Vector3 point ) : bool
collider UnityEngine.Collider /// Collider to check against. ///
point UnityEngine.Vector3 /// Point being checked. ///
return bool