|
TrueSync
|
Helpers for 2D physics. More...
Public Types | |
| enum | TSCapsuleDirection2D { VERTICAL, HORIZONTAL } |
Static Public Member Functions | |
| static TSCollider2D | OverlapCircle (TSVector2 point, FP radius) |
| Returns the first TSCollider2D within a circular area. Returns null if there is none. More... | |
| static TSCollider2D[] | OverlapCircleAll (TSVector2 point, FP radius) |
| Returns all TSCollider2D within a circular area. Returns null if there is none. More... | |
| static object | _OverlapArea (TSVector2 pointA, TSVector2 pointB, Physics2D.BodySpecialSensor sensorType) |
| Returns the first TSCollider2D within a rectangular area. Returns null if there is none. More... | |
| static TSCollider2D | OverlapArea (TSVector2 pointA, TSVector2 pointB) |
| Returns the first TSCollider2D within a rectangular area. Returns null if there is none. More... | |
| static TSCollider2D[] | OverlapAreaAll (TSVector2 pointA, TSVector2 pointB) |
| Returns all TSCollider2D within a rectangular area. Returns null if there is none. More... | |
| static TSCollider2D | OverlapPoint (TSVector2 point) |
| Returns the first TSCollider2D within a small circular area. Returns null if there is none. More... | |
| static TSCollider2D[] | OverlapPointAll (TSVector2 point) |
| Returns all TSCollider2D within a small circular area. Returns null if there is none. More... | |
| static TSCollider2D | OverlapBox (TSVector2 point, TSVector2 size, FP angle) |
| Returns the first TSCollider2D within a box area. Returns null if there is none. More... | |
| static TSCollider2D[] | OverlapBoxAll (TSVector2 point, TSVector2 size, FP angle) |
| 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) |
| 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) |
| 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) |
| static TSRaycastHit2D | CircleCast (TSVector2 origin, FP radius, TSVector2 direction, FP distance) |
| 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) |
| Cast a circle and returns an array TSRaycastHit2D with information about all TSCollider2D found. Returns null if there is none. More... | |
Static Public Attributes | |
| static Physics2D.Body | _testBody |
Helpers for 2D physics.
Definition at line 9 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a rectangular area. Returns null if there is none.
| pointA | Top-left corner of the rectangle. |
| radius | Bottom-right corner of the rectangle. |
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.
| origin | Origin of the circle in world space. |
| radius | Radius of the circle. |
| direction | Direction TSVector2 of the cast. |
| distance | Max distance to reach. |
Definition at line 260 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.
| origin | Origin of the circle in world space. |
| radius | Radius of the circle. |
| direction | Direction TSVector2 of the cast. |
| distance | Max distance to reach. |
Definition at line 272 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a rectangular area. Returns null if there is none.
| pointA | Top-left corner of the rectangle. |
| radius | Bottom-right corner of the rectangle. |
Definition at line 108 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a rectangular area. Returns null if there is none.
| pointA | Top-left corner of the rectangle. |
| radius | Bottom-right corner of the rectangle. |
Definition at line 118 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a box area. Returns null if there is none.
| point | Center of the box in world space. |
| size | Size of the box. |
| angle | Rotation angle in degrees of the box. |
Definition at line 154 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a box area. Returns null if there is none.
| point | Center of the box in world space. |
| size | Size of the box. |
| angle | Rotation angle in degrees of the box. |
Definition at line 165 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a capsule area. Returns null if there is none.
| 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. |
Definition at line 194 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a capsule area. Returns null if there is none.
| 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. |
Definition at line 206 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a circular area. Returns null if there is none.
| point | Center of the circle in world space. |
| radius | Radius of the circle. |
Definition at line 68 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a circular area. Returns null if there is none.
| point | Center of the circle in world space. |
| radius | Radius of the circle. |
Definition at line 78 of file TSPhysics2D.cs.
|
static |
Returns the first TSCollider2D within a small circular area. Returns null if there is none.
| point | Center of the point in world space. |
Definition at line 127 of file TSPhysics2D.cs.
|
static |
Returns all TSCollider2D within a small circular area. Returns null if there is none.
| point | Center of the point in world space. |
Definition at line 136 of file TSPhysics2D.cs.
1.8.11