|
| Api (FrameBase frame, int threadCount) |
| Initializes an Api object to provide the physics functions. More...
|
|
PhysicsQueryRef | AddLinecastQuery (FPVector2 start, FPVector2 end, bool firstHitOnly=false, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Adds a broad-phase line cast query to the 2D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
|
|
PhysicsQueryRef | AddOverlapShapeQuery (FPVector2 position, FP rotation, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Adds a broad-phase shape overlap query to the 2D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
|
|
PhysicsQueryRef | AddOverlapShapeQuery (Transform2D transform, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll) |
| Adds a broad-phase shape overlap query to the 2D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
|
|
PhysicsQueryRef | AddOverlapShapeQuery (Transform2D transform, Transform2DVertical transformVertical, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll) |
| Adds a broad-phase shape overlap query to the 2D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
|
|
PhysicsQueryRef | AddRaycastQuery (FPVector2 origin, FPVector2 direction, FP distance, bool firstHitOnly=false, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Adds a broad-phase raycast query to the 2D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
|
|
PhysicsQueryRef | AddShapeCastQuery (FPVector2 start, FP rotation, Shape2D *shape, FPVector2 translation, bool firstHitOnly=false, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Adds a broad-phase shape cast query to the 2D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
|
|
PhysicsQueryRef | AddShapeCastQuery (FPVector2 start, FP rotation, Shape2D shape, FPVector2 translation, bool firstHitOnly=false, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
|
HitCollection * | AllocatePersistentHitCollection (int defaultCapacity=64) |
| Allocates a persistent HitCollection on the heap with an initial capacity. To free an allocated persistent collection of 2D hits, use FreePersistentHitCollection. More...
|
|
bool | CheckOverlap (HitCollection *hits, Shape2D *shape, Transform2D *transform, Hit *hit) |
| Checks if the shape of the hit overlaps another shape and add the results in a HitCollection. More...
|
|
HitCollection | CheckOverlap (Shape2D *shape, Transform2D *transform, Hit *hit) |
| Checks if the shape of the hit overlaps another shape. More...
|
|
bool | CheckOverlap (Shape2D.BoxShape boxShape, Transform2D *boxTransform, Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, out CollisionResultInfo2D result) |
| Checks if a box shape overlaps with a capsule shape. More...
|
|
bool | CheckOverlap (Shape2D.BoxShape boxShape, Transform2D *boxTransform, Shape2D.CircleShape circleShape, FPVector2 circlePosition, out CollisionResultInfo2D result) |
| Checks if a box shape overlaps with a circle shape. More...
|
|
bool | CheckOverlap (Shape2D.BoxShape boxShape, Transform2D *boxTransform, Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, out CollisionResultInfo2D result) |
| Checks if a box shape overlaps with edge box shape. More...
|
|
bool | CheckOverlap (Shape2D.BoxShape boxShape, Transform2D *boxTransform, Shape2D.PolygonShape polygonShape, Transform2D *polygonTransform, out CollisionResultInfo2D result) |
| Checks if a box shape overlaps with a polygon shape. More...
|
|
bool | CheckOverlap (Shape2D.BoxShape boxShapeA, Transform2D *transformA, Shape2D.BoxShape boxShapeB, Transform2D *transformB, out CollisionResultInfo2D result) |
| Checks if a box shape overlaps with another box shape. More...
|
|
bool | CheckOverlap (Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, Shape2D.BoxShape boxShape, Transform2D *boxTransform, out CollisionResultInfo2D result) |
| Checks if a capsule shape overlaps with a box shape. More...
|
|
bool | CheckOverlap (Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, Shape2D.CircleShape circleShape, FPVector2 circlePosition, out CollisionResultInfo2D result) |
| Checks if a capsule shape overlaps with a circle shape. More...
|
|
bool | CheckOverlap (Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, out CollisionResultInfo2D result) |
| Checks if a capsule shape overlaps with a edge shape. More...
|
|
bool | CheckOverlap (Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, Shape2D.PolygonShape polygonShape, Transform2D *polygonTransform, out CollisionResultInfo2D result) |
| Checks if a capsule shape overlaps with a polygon shape. More...
|
|
bool | CheckOverlap (Shape2D.CapsuleShape capsuleShapeA, Transform2D *capsuleTransformA, Shape2D.CapsuleShape capsuleShapeB, Transform2D *capsuleTransformB, out CollisionResultInfo2D result) |
| Checks if a capsule shape overlaps with another capsule shape. More...
|
|
bool | CheckOverlap (Shape2D.CircleShape circleShape, FPVector2 circlePosition, Shape2D.BoxShape boxShape, Transform2D *boxTransform, out CollisionResultInfo2D result) |
| Checks if a circle shape overlaps with a box shape. More...
|
|
bool | CheckOverlap (Shape2D.CircleShape circleShape, FPVector2 circlePosition, Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, out CollisionResultInfo2D result) |
| Checks if a circle shape overlaps with a capsule shape. More...
|
|
bool | CheckOverlap (Shape2D.CircleShape circleShape, FPVector2 circlePosition, Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, out CollisionResultInfo2D result) |
| Checks if a circle shape overlaps with a edge shape. More...
|
|
bool | CheckOverlap (Shape2D.CircleShape circleShape, FPVector2 circlePosition, Shape2D.PolygonShape polygonShape, Transform2D *polygonTransform, out CollisionResultInfo2D result) |
| Checks if a circle shape overlaps with a polygon shape. More...
|
|
bool | CheckOverlap (Shape2D.CircleShape circleShapeA, FPVector2 circlePositionA, Shape2D.CircleShape circleShapeB, FPVector2 circlePositionB, out CollisionResultInfo2D result) |
| Checks if a circle shape overlaps with another circle shape. More...
|
|
bool | CheckOverlap (Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, Shape2D.BoxShape boxShape, Transform2D *boxTransform, out CollisionResultInfo2D result) |
| Checks if a edge shape overlaps with a box shape. More...
|
|
bool | CheckOverlap (Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, out CollisionResultInfo2D result) |
| Checks if a edge shape overlaps with a capsule shape. More...
|
|
bool | CheckOverlap (Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, Shape2D.CircleShape circleShape, FPVector2 circlePosition, out CollisionResultInfo2D result) |
| Checks if a edge shape overlaps with a circle shape. More...
|
|
bool | CheckOverlap (Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, Shape2D.PolygonShape polygonShape, Transform2D *polygonTransform, out CollisionResultInfo2D result) |
| Checks if a edge shape overlaps with a polygon shape. More...
|
|
bool | CheckOverlap (Shape2D.EdgeShape edgeShapeA, Transform2D *edgeTransformA, Shape2D.EdgeShape edgeShapeB, Transform2D *edgeTransformB, out CollisionResultInfo2D result) |
| Checks if a edge shape overlaps with another edge shape. More...
|
|
bool | CheckOverlap (Shape2D.PolygonShape polygonAssetA, Transform2D *transformA, Shape2D.PolygonShape polygonAssetB, Transform2D *transformB, out CollisionResultInfo2D result) |
| Checks if a polygon shape overlaps with another polygon shape. More...
|
|
void | FreePersistentHitCollection (HitCollection *collection) |
| Free a persistent HitCollection previously allocated on the heap. To allocate a persistent collection of 2D hits, use AllocatePersistentHitCollection. More...
|
|
bool | GetAllQueriesHits (out HitCollection *queriesHits, out int queriesCount) |
| Gets all the results for all the broad-phase queries added to the 2D physics scene this frame. More...
|
|
CallbackFlags | GetCallbacks (EntityRef entity) |
| Get the flags that represent which 2D physics collision callbacks will be called for the entity . More...
|
|
HitCollection | GetQueryHits (in PhysicsQueryRef queryRef) |
| Gets the results of a broad-phase query added to the 2D physics scene. More...
|
|
HitCollection | GetQueryHits (int index) |
| Obsolete. Use 'GetQueryHits(in PhysicsQueryRef)' overload instead. More...
|
|
void | Init () |
| Initializes the game scene and creates all the physics static entries using the settings from the map. More...
|
|
void | Init (AssetRef< Map > mapRef) |
| Initializes the game scene by cleaning all physics data and settings and create the new static physics entries for each static collider component in the mapRef . More...
|
|
bool | IsStaticColliderEnabled (int staticColliderIndex) |
| Returns the current state of a 2D static collider. More...
|
|
bool | IsValidQueryRef (in PhysicsQueryRef queryRef) |
| Checks if a given broad-phase physics query reference is valid for result retrieval. Broad-phase queries must be injected before the Physics system Update, their Ref stored and the results retrieved after the Physics Update, on the same frame. More...
|
|
Hit? | Linecast (FPVector2 start, FPVector2 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a line cast and returns the closest hit to the line start, if any. More...
|
|
void | Linecast (HitCollection *collection, FPVector2 start, FPVector2 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a line cast and adds the closest hit to the line start, if any, to a persistent collection of hits. More...
|
|
HitCollection | LinecastAll (FPVector2 start, FPVector2 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a line cast, returning all hits. More...
|
|
void | LinecastAll (HitCollection *collection, FPVector2 start, FPVector2 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a line cast, adding all hits to a persistent collection. More...
|
|
HitCollection | OverlapShape (FPVector2 position, FP rotation, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a shape overlap. More...
|
|
void | OverlapShape (HitCollection *collection, FPVector2 position, FP rotation, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a shape overlap. More...
|
|
void | OverlapShape (HitCollection *collection, Transform2D transform, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll) |
| Queries the 2D physics scene with a shape overlap. More...
|
|
void | OverlapShape (HitCollection *collection, Transform2D transform, Transform2DVertical transformVertical, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll) |
| Queries the 2D physics scene with a shape overlap. More...
|
|
HitCollection | OverlapShape (Transform2D transform, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll) |
| Queries the 2D physics scene with a shape overlap. More...
|
|
HitCollection | OverlapShape (Transform2D transform, Transform2DVertical transformVertical, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll) |
| Queries the 2D physics scene with a shape overlap. More...
|
|
Hit? | Raycast (FPVector2 origin, FPVector2 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a ray cast and returns the closest hit to the ray origin, if any. More...
|
|
void | Raycast (HitCollection *collection, FPVector2 origin, FPVector2 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a ray cast and adds the closest hit to the ray origin, if any, to a persistent collection of hits. More...
|
|
HitCollection | RaycastAll (FPVector2 origin, FPVector2 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a ray cast, returning all hits. More...
|
|
void | RaycastAll (HitCollection *collection, FPVector2 origin, FPVector2 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a ray cast, adding all hits to a persistent collection. More...
|
|
void | ResetCallbacks (EntityRef entity) |
| Resets the tracking history of collisions the entity might have. More...
|
|
void | ResetMap () |
| Resets 2D physics scene map asset guid. More...
|
|
void | ResetScene () |
| Resets the entries buffer and removes all the dynamic entries of the scene. Also, joints, queries and collision data are cleaned. The PhysicsCommon.MapPhysicsData is changed to default and the PhysicsSceneSettings is changed to initial state. More...
|
|
void | SetCallbacks (EntityRef entity, CallbackFlags flags) |
| Sets which 2D physics collision callbacks will be called for the entity . More...
|
|
void | SetStaticColliderEnabled (int staticColliderIndex, bool enabled) |
| Set a toggleable 2D static collider enabled state to enabled . Disabled static colliders are not considered for collisions or on query resolutions. More...
|
|
Hit? | ShapeCast (FPVector2 start, FP rotation, Shape2D *shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a shape cast and returns the hit with the shortest Hit.CastDistanceNormalized, if any. More...
|
|
Hit? | ShapeCast (FPVector2 start, FP rotation, Shape2D shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
|
void | ShapeCast (HitCollection *collection, FPVector2 start, FP rotation, Shape2D *shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a shape cast and adds the hit with the shortest Hit.CastDistanceNormalized, if any, to a persistent collection of hits. More...
|
|
HitCollection | ShapeCastAll (FPVector2 start, FP rotation, Shape2D *shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a shape cast, returning all hits. More...
|
|
HitCollection | ShapeCastAll (FPVector2 start, FP rotation, Shape2D shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
|
void | ShapeCastAll (HitCollection *collection, FPVector2 start, FP rotation, Shape2D *shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default) |
| Queries the 2D physics scene with a shape cast, adding all hits to a persistent collection. More...
|
|
bool | TryGetQueryHits (in PhysicsQueryRef queryRef, out HitCollection queryHits) |
| Tries to get the results of a broad-phase query added to the 2D physics scene. More...
|
|
bool | TryGetQueryHits (int index, out HitCollection queryHits) |
| Obsolete. Use 'TryGetQueryHits(in PhysicsQueryRef, out HitCollection)' overload instead. More...
|
|
TaskHandle | Update (ICollisionCallbacks2D callbacks, FP dt, TaskHandle taskHandle) |
| Schedules all tasks that compose the 2D Physics Update loop. If the frame map changed, the static part of the physics engine is also reset. More...
|
|