-
Notifications
You must be signed in to change notification settings - Fork 1
Physics bindings
Refer to Unity's Physics documentation for properties and methods description.
-
AllLayers
: get, int -
DefaultRaycastLayers
: get, int -
gravity
: get/set, Vector3 -
IgnoreRaycastLayer
: get, int
-
bool BoxCast(Vector3 center, Vector3 halfExtents, Vector3 direction, Quaternion orientation = Quaternion.identity, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
-
table BoxCastAll(Vector3 center, Vector3 halfExtents, Vector3 direction, Quaternion orientation = Quaternion.identity, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
: table withRaycastHit
elements, sorted by hit distance from near to far -
bool CapsuleCast(Vector3 pointA, Vector3 pointB, float radius, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
-
table CapsuleCastAll(Vector3 pointA, Vector3 pointB, float radius, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
: table withRaycastHit
elements, sorted by hit distance from near to far -
bool CheckBox(Vector3 center, Vector3 halfExtents, Quaternion orientation = Quaternion.identity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
-
bool CheckCapsule(Vector3 pointA, Vector3 pointB, float radius, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
-
bool CheckSphere(Vector3 center, float radius, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
-
Vector3 ClosestPoint(Vector3 point, Collider collider, Vector3 position, Quaternion rotation)
-
Vector3 float ComputePenetration(Collider colliderA, Vector3 positionA, Quaternion rotationA, Collider colliderB, Vector3 positionB, Quaternion rotationB)
-
bool GetIgnoreCollision(Collider colliderA, Collider colliderB)
-
bool GetIgnoreLayerCollision(int layerA, int layerB)
-
bool IgnoreCollision(Collider colliderA, Collider colliderB, bool state)
-
bool Linecast(Vector3 pointA, Vector3 pointB, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
-
table OverlapBox(Vector3 center, Vector3 halfExtents, Quaternion orientation = Quaternion.identity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
: table withCollider
elements -
table OverlapCapsule(Vector3 pointA, Vector3 pointB, float radius, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
: table withCollider
elements -
table OverlapSphere(Vector3 point, float radius, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
: table withCollider
elements -
bool Raycast(Vector3 origin, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
-
table RaycastAll(Vector3 origin, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
: table withRaycastHit
elements, sorted by hit distance from near to far -
bool SphereCast(Vector3 position, float radius, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
-
table SphereCastAll(Vector3 position, float radius, Vector3 direction, float maxDistance = Mathf.Infinity, int layerMask = Physics.DefaultRaycastLayers, string queryTriggerInteraction = "UseGlobal")
: table withRaycastHit
elements, sorted by hit distance from near to far