TrueSync
|
Helpers for 2D physics. More...
Public Types | |
enum | TSCapsuleDirection2D { VERTICAL, HORIZONTAL } |
Static Public Member Functions | |
static TSCollider2D | OverlapCircle (TSVector2 point, FP radius, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns the first TSCollider2D within a circular area. Returns null if there is none. More... | |
static TSCollider2D[] | OverlapCircleAll (TSVector2 point, FP radius, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns all TSCollider2D within a circular area. Returns null if there is none. More... | |
static object | _OverlapArea (TSVector2 pointA, TSVector2 pointB, Physics2D.BodySpecialSensor sensorType, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns the first TSCollider2D within a rectangular area. Returns null if there is none. More... | |
static TSCollider2D | OverlapArea (TSVector2 pointA, TSVector2 pointB, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns the first TSCollider2D within a rectangular area. Returns null if there is none. More... | |
static TSCollider2D[] | OverlapAreaAll (TSVector2 pointA, TSVector2 pointB, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns all TSCollider2D within a rectangular area. Returns null if there is none. More... | |
static TSCollider2D | OverlapPoint (TSVector2 point, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns the first TSCollider2D within a small circular area. Returns null if there is none. More... | |
static TSCollider2D[] | OverlapPointAll (TSVector2 point, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns all TSCollider2D within a small circular area. Returns null if there is none. More... | |
static TSCollider2D | OverlapBox (TSVector2 point, TSVector2 size, FP angle, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns the first TSCollider2D within a box area. Returns null if there is none. More... | |
static TSCollider2D[] | OverlapBoxAll (TSVector2 point, TSVector2 size, FP angle, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns all TSCollider2D within a box area. Returns null if there is none. More... | |
static TSCollider2D | OverlapCapsule (TSVector2 point, TSVector2 size, TSCapsuleDirection2D direction, FP angle, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns the first TSCollider2D within a capsule area. Returns null if there is none. More... | |
static TSCollider2D[] | OverlapCapsuleAll (TSVector2 point, TSVector2 size, TSCapsuleDirection2D direction, FP angle, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Returns all TSCollider2D within a capsule area. Returns null if there is none. More... | |
static object | _CircleCast (TSVector2 origin, FP radius, TSVector2 direction, FP distance, Physics2D.BodySpecialSensor sensorType, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
static TSRaycastHit2D | CircleCast (TSVector2 origin, FP radius, TSVector2 direction, FP distance, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Cast a circle and returns a TSRaycastHit2D with information about the first TSCollider2D found. Returns null if there is none. More... | |
static TSRaycastHit2D[] | CircleCastAll (TSVector2 origin, FP radius, TSVector2 direction, FP distance, int layerMask=UnityEngine.Physics.DefaultRaycastLayers) |
Cast a circle and returns an array TSRaycastHit2D with information about all TSCollider2D found. Returns null if there is none. More... | |
static TSRaycastHit2D | Raycast (TSVector2 origin, TSVector2 direction, FP distance) |
static TSRaycastHit2D[] | RaycastAll (TSVector2 origin, TSVector2 direction, FP distance) |
Detailed Description
Helpers for 2D physics.
Definition at line 9 of file TSPhysics2D.cs.
Member Function Documentation
|
static |
Returns the first TSCollider2D within a rectangular area. Returns null if there is none.
- Parameters
-
pointA Top-left corner of the rectangle. radius Bottom-right corner of the rectangle. layerMask Unity's layer mask to filter objects.
Definition at line 88 of file TSPhysics2D.cs.
|
static |
Cast a circle and returns a TSRaycastHit2D with information about the first TSCollider2D found. Returns null if there is none.
- Parameters
-
origin Origin of the circle in world space. radius Radius of the circle. direction Direction TSVector2 of the cast. distance Max distance to reach. layerMask Unity's layer mask to filter objects.
Definition at line 269 of file TSPhysics2D.cs.
|
static |
Cast a circle and returns an array TSRaycastHit2D with information about all TSCollider2D found. Returns null if there is none.
- Parameters
-
origin Origin of the circle in world space. radius Radius of the circle. direction Direction TSVector2 of the cast. distance Max distance to reach. layerMask Unity's layer mask to filter objects.
Definition at line 282 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a rectangular area. Returns null if there is none.
- Parameters
-
pointA Top-left corner of the rectangle. radius Bottom-right corner of the rectangle. layerMask Unity's layer mask to filter objects.
Definition at line 109 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a rectangular area. Returns null if there is none.
- Parameters
-
pointA Top-left corner of the rectangle. radius Bottom-right corner of the rectangle. layerMask Unity's layer mask to filter objects.
Definition at line 120 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a box area. Returns null if there is none.
- Parameters
-
point Center of the box in world space. size Size of the box. angle Rotation angle in degrees of the box. layerMask Unity's layer mask to filter objects.
Definition at line 159 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a box area. Returns null if there is none.
- Parameters
-
point Center of the box in world space. size Size of the box. angle Rotation angle in degrees of the box. layerMask Unity's layer mask to filter objects.
Definition at line 171 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a capsule area. Returns null if there is none.
- Parameters
-
point Center of the capsule in world space. size Size of the capsule. direction If it is a vertical or horizontal capsule. angle Rotation angle in degrees of the capsule. layerMask Unity's layer mask to filter objects.
Definition at line 201 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a capsule area. Returns null if there is none.
- Parameters
-
point Center of the capsule in world space. size Size of the capsule. direction If it is a vertical or horizontal capsule. angle Rotation angle in degrees of the capsule. layerMask Unity's layer mask to filter objects.
Definition at line 214 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a circular area. Returns null if there is none.
- Parameters
-
point Center of the circle in world space. radius Radius of the circle. layerMask Unity's layer mask to filter objects.
Definition at line 66 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a circular area. Returns null if there is none.
- Parameters
-
point Center of the circle in world space. radius Radius of the circle. layerMask Unity's layer mask to filter objects.
Definition at line 77 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a small circular area. Returns null if there is none.
- Parameters
-
point Center of the point in world space. layerMask Unity's layer mask to filter objects.
Definition at line 130 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a small circular area. Returns null if there is none.
- Parameters
-
point Center of the point in world space. layerMask Unity's layer mask to filter objects.
Definition at line 140 of file TSPhysics2D.cs.
The documentation for this class was generated from the following file:
Generated by
