Groups the 2D Physics classes. More...
Classes | |
class | Quantum.Physics2D.PhysicsEngine2D.Api |
2D Physics API More... | |
struct | Quantum.Shape2D.BoxShape |
Defines a 2D box in its local space. In order to create a Shape2D of type Shape2DType.Box, use Shape2D.CreateBox.
| |
struct | Quantum.Shape2D.CapsuleShape |
Defines a 2D capsule in its local space. In order to create a Shape2D of type Shape2DType.Capsule, use Shape2D.CreateCapsule.
| |
struct | Quantum.CharacterController2D |
A component for kinematic character controller prototyping that uses a circle as a shape. You can quickly add this to an entity and set a CharacterController2DConfig, then call the CharacterController2D.Move(FrameBase, EntityRef, FPVector2, IKCCCallbacks2D, int?, bool?, FP?) method in a system update. More... | |
struct | Quantum.CharacterController2DMovement |
Result of a 2D KCC raw movement query. More... | |
struct | Quantum.Shape2D.CircleShape |
Defines a 2D circle in its local space. In order to create a Shape2D of type Shape2DType.Circle, use Shape2D.CreateCircle.
| |
struct | Quantum.CollisionInfo2D |
Info about a collision between two 2D physics colliders. More... | |
struct | Quantum.Physics2D.CollisionResultInfo2D |
A structure for containing all the result information from the collision between two shapes. More... | |
struct | Quantum.CollisionInfo2D.ContactPointIterator2D |
A helper for safety interaction through the contact point buffer. More... | |
struct | Quantum.Shape2D.EdgeShape |
Defines a 2D edge in its local space. In order to create a Shape2D of type Shape2DType.Edge, use Shape2D.CreateEdge.
| |
struct | Quantum.ExitInfo2D |
Info about two entities that were colliding in the 2D Physics. More... | |
struct | Quantum.Physics2D.Hit |
Information returned from a valid hit of a physics query. More... | |
struct | Quantum.Physics2D.HitCollection |
Collection of hits returned from a physics query. More... | |
interface | Quantum.Core.ICollisionCallbacks2D |
Interface for receiving 2D collision callbacks More... | |
interface | Quantum.IKCCCallbacks2D |
The interface receives the interaction callbacks from the character controller system. More... | |
interface | Quantum.ISignalOnCollision2D |
Interface for receiving callbacks once per frame while two non-trigger 2D colliders are touching. More... | |
interface | Quantum.ISignalOnCollisionEnter2D |
Interface for receiving callbacks once two non-trigger 2D colliders start touching. More... | |
interface | Quantum.ISignalOnCollisionExit2D |
Interface for receiving callbacks once two non-trigger 2D colliders stop touching. More... | |
interface | Quantum.ISignalOnTrigger2D |
Interface for receiving callbacks once per frame while a non-trigger and a trigger 2D colliders are touching. More... | |
interface | Quantum.ISignalOnTriggerEnter2D |
Interface for receiving callbacks once a non-trigger and a trigger 2D colliders start touching. More... | |
interface | Quantum.ISignalOnTriggerExit2D |
Interface for receiving callbacks once a non-trigger and a trigger 2D colliders stop touching. More... | |
struct | Quantum.MapStaticCollider2D |
The data structure to hold 2D static colliders for a Quantum map. Static colliders are baked into the map and are used for efficient collision detection. More... | |
class | Quantum.MapStaticCollider2DPolygonData |
Stores 2D polygon collider data used on static collider MapStaticCollider2D. More... | |
struct | Quantum.PhysicsBody2D |
Adds physics motion to an entity with a PhysicsCollider2D driven by the built-in physics systems. You can customize how the movement of the physics body will works by changing the Mass, GravityScale or Drag. A Kinematic body will not have linear and angular velocities integrated, but those values are still perceived and taken into account when resolving the collision with other dynamic bodies. More... | |
struct | Quantum.PhysicsCallbacks2D |
A component that tracks the collisions (trigger and non-trigger) this entity is involved in. The tracked metadata is used to raise physics callbacks according to the callback Flags set. More... | |
struct | Quantum.PhysicsCollider2D |
A component with a shape used to represent 2D physics objects in the physics simulation. You can use flags and layers to setup how the object interacts with other colliders. More... | |
class | Quantum.PolygonCollider |
The asset that contains data of a convex polygon. More... | |
struct | Quantum.Shape2D.PolygonShape |
References a Polygin shape by the AssetRef<T> of its Quantum.PolygonCollider asset. More... | |
struct | Quantum.Shape2D |
Defines a 2D shape with Type and data disposed in a union-like structure. All shapes have a UserTag, BroadRadius and Centroid. All non-compound shapes have a LocalTransform and their Centroid always match their local transform position. More... | |
class | Quantum.Shape2DConfig |
The base settings for building a Shape2D. More... | |
struct | Quantum.Physics2D.PhysicsEngine2D.Api.ThreadSafeApi |
Struct to provide thread-safe access to the physics functions. More... | |
struct | Quantum.TriggerInfo2D |
Info about a collision between a trigger and a non-trigger 2D physics colliders. More... | |
Enumerations | |
enum | Quantum.PhysicsBody2D.ConfigFlags : byte |
The flags to set up how the physics body will behave in the physics systems. More... | |
enum | Quantum.Shape2DType : byte |
Defines the geometry used by the Shape2D. More... | |
Functions | |
PhysicsQueryRef | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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... | |
HitCollection * | Quantum.Physics2D.PhysicsEngine2D.Api.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... | |
static PhysicsBody2D | Quantum.PhysicsBody2D.CreateDynamic (FP mass, FP drag, FP angularDrag, Boolean allowSleeping, Boolean awakenByKinematics=false, Boolean freezeRotation=false, FPVector2? centerOfMass=null, NullableFP gravityScale=default) |
Creates a dynamic PhysicsBody2D. More... | |
static PhysicsBody2D | Quantum.PhysicsBody2D.CreateKinematic () |
Creates a kinematic PhysicsBody2D. The mass, drag and angular drag are not considered in kinematic interactions and have 0 as value. More... | |
void | Quantum.Physics2D.PhysicsEngine2D.Api.FreePersistentHitCollection (HitCollection *collection) |
Free a persistent HitCollection previously allocated on the heap. To allocate a persistent collection of 2D hits, use AllocatePersistentHitCollection. More... | |
bool | Quantum.Physics2D.PhysicsEngine2D.Api.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... | |
HitCollection | Quantum.Physics2D.PhysicsEngine2D.Api.GetQueryHits (in PhysicsQueryRef queryRef) |
Gets the results of a broad-phase query added to the 2D physics scene. More... | |
void | Quantum.PhysicsBody2D.InitBody (FP bodyMass, FP drag, FP angularDrag, ConfigFlags bodyConfig, FPVector2? centerOfMass=null, NullableFP gravityScale=default) |
Initializes a PhysicsBody2D component with custom settings. More... | |
bool | Quantum.Physics2D.PhysicsEngine2D.Api.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? | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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... | |
void | Quantum.ISignalOnCollision2D.OnCollision2D (Frame f, CollisionInfo2D info) |
Called once per frame while two non-trigger 2D colliders are touching. More... | |
void | Quantum.ISignalOnCollisionEnter2D.OnCollisionEnter2D (Frame f, CollisionInfo2D info) |
Called once two non-trigger 2D colliders start touching. More... | |
void | Quantum.ISignalOnCollisionExit2D.OnCollisionExit2D (Frame f, ExitInfo2D info) |
Called once two non-trigger 2D colliders stop touching. More... | |
void | Quantum.ISignalOnTrigger2D.OnTrigger2D (Frame f, TriggerInfo2D info) |
Called once per frame while a non-trigger and a trigger 2D colliders are touching. More... | |
void | Quantum.ISignalOnTriggerEnter2D.OnTriggerEnter2D (Frame f, TriggerInfo2D info) |
Called once a non-trigger and a trigger 2D colliders start touching. More... | |
void | Quantum.ISignalOnTriggerExit2D.OnTriggerExit2D (Frame f, ExitInfo2D info) |
Called once a non-trigger and a trigger 2D colliders stop touching. More... | |
HitCollection | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.OverlapShape (Transform2D transform, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll) |
Queries the 2D physics scene with a shape overlap. More... | |
HitCollection | Quantum.Physics2D.PhysicsEngine2D.Api.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? | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.SetCallbacks (EntityRef entity, CallbackFlags flags) |
Sets which 2D physics collision callbacks will be called for the entity . More... | |
Hit? | Quantum.Physics2D.PhysicsEngine2D.Api.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... | |
void | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.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... | |
void | Quantum.Physics2D.PhysicsEngine2D.Api.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 | Quantum.Physics2D.PhysicsEngine2D.Api.TryGetQueryHits (in PhysicsQueryRef queryRef, out HitCollection queryHits) |
Tries to get the results of a broad-phase query added to the 2D physics scene. More... | |
Groups the 2D Physics classes.
|
strong |
The flags to set up how the physics body will behave in the physics systems.
Enumerator | |
---|---|
Default | IsAllowedToSleep | IsAwakenedByForces | ResetInertiaOnAdded | ResetCenterOfMassOnAdded |
IsKinematic | Prevents linear and angular velocities from being integrated. |
FreezeRotation | Prevents the physics update to apply changes to the rotation. |
IsAllowedToSleep | Allows the physics body to sleep after some time at rest. |
IsAwakenedByForces | Allows sleeping physic bodies to be awakened by dynamic interactions. |
IsAwakenedByKinematics | Allows sleeping physic bodies to be awakened by kinematic interaction. |
ResetInertiaOnAdded | Allows the physics body to compute the inertia automatically when it is added to an entity. |
ResetCenterOfMassOnAdded | Resets the CenterOfMass to the shape Shape2D.Centroid when the physics body is added to an entity. |
UseContinuousCollisionDetection | Prevents the physics body from passing through other objects when at high velocity. |
|
strong |
Defines the geometry used by the Shape2D.
|
inline |
Sets which 2D physics collision callbacks will be called for the entity .
The entity must have a PhysicsCollider2D component attached to be able to collide with other physics entries.
For receiving the callbacks, set the CallbackFlags and implement the corresponding signal on a system.
entity | An entity with a PhysicsCollider2D component attached. |
flags | The CallbackFlags of the desired collision callbacks. |
|
inline |
Allocates a persistent HitCollection on the heap with an initial capacity. To free an allocated persistent collection of 2D hits, use FreePersistentHitCollection.
defaultCapacity | The initial Hit buffer capacity allocated for the hit collection. |
|
inline |
Free a persistent HitCollection previously allocated on the heap. To allocate a persistent collection of 2D hits, use AllocatePersistentHitCollection.
collection | A pointer to the persistent hit collection to be freed. |
InvalidOperationException | Thrown when the hit collection was not allocated as persistent. |
|
inline |
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.
queryRef | The query ref to be checked. |
true
if the query ref is valid and query results can be retrieved from it this frame. false
otherwise.
|
inline |
Gets the results of a broad-phase query added to the 2D physics scene.
queryRef | Broad-phase Query reference. Returned when adding a broad-phase query to the physics engine. |
|
inline |
Tries to get the results of a broad-phase query added to the 2D physics scene.
queryRef | Broad-phase Query reference. Returned when adding a broad-phase query to the physics engine. |
queryHits | The HitCollection with the query hits. Default if the index is not valid. |
true
if the index is valid, false
otherwise.
|
inline |
Gets all the results for all the broad-phase queries added to the 2D physics scene this frame.
queriesHits | A buffer of HitCollection with queriesCount elements, one for each broad-phase query added. |
queriesCount | The number of elements in the queriesHits buffer, also matching the number on broad-phase queries added. |
true
if at least one broad-phase query has been added from a system that runs before the physics engine.Example of how to iterate over added broad-phase queries results.
|
inline |
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.
origin | The ray origin point, in a 2D world space. |
direction | The direction of the ray, not normalized internally. |
distance | The ray distance from the origin point on the specified direction. |
firstHitOnly | If the query results should return only the closest hit to the ray origin or all hits (default). |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
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.
start | The line start point, in a 2D world space. |
end | The line end point, in a 2D world space. |
firstHitOnly | If the query results should return only the closest hit to the line start or all hits (default). |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a ray cast and returns the closest hit to the ray origin, if any.
origin | The ray origin point, in a 2D world space. |
direction | The direction of the ray, not normalized internally. |
distance | The ray distance from the origin point on the specified direction. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
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.
collection | A previously allocated persistent HitCollection, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection. |
origin | The ray origin point, in a 2D world space. |
direction | The direction of the ray, not normalized internally. |
distance | The ray distance from the origin point on the specified direction. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a line cast and returns the closest hit to the line start, if any.
start | The line start point, in a 2D world space. |
end | The line end point, in a 2D world space. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
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.
collection | A previously allocated persistent HitCollection, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection. |
start | The line start point, in a 2D world space. |
end | The line end point, in a 2D world space. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a ray cast, returning all hits.
origin | The ray origin point, in a 2D world space. |
direction | The direction of the ray, not normalized internally. |
distance | The ray distance from the origin point on the specified direction. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a ray cast, adding all hits to a persistent collection.
collection | A previously allocated persistent HitCollection, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection. |
origin | The ray origin point, in a 2D world space. |
direction | The direction of the ray, not normalized internally. |
distance | The ray distance from the origin point on the specified direction. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a line cast, returning all hits.
start | The line start point, in a 2D world space. |
end | The line end point, in a 2D world space. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a line cast, adding all hits to a persistent collection.
collection | A previously allocated persistent HitCollection, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection. |
start | The line start point, in a 2D world space. |
end | The line end point, in a 2D world space. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
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.
start | The cast start point, in a 2D world space. |
rotation | The rotation of the shape, in radians. |
shape | The 2D shape to be casted. |
translation | The cast direction and distance, from the cast start point. |
firstHitOnly | If the query results should return only the hit with the smallest Hit.CastDistanceNormalized or all hits (default). |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a shape cast and returns the hit with the shortest Hit.CastDistanceNormalized, if any.
start | The cast start, in a 2D world space. |
rotation | The rotation of the shape, in radians. |
shape | The 2D shape to be casted. |
translation | The cast direction and distance, from the cast start point. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
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.
collection | A previously allocated persistent HitCollection, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection. |
start | The cast start, in a 2D world space. |
rotation | The rotation of the shape, in radians. |
shape | The 2D shape to be casted. |
translation | The cast direction and distance, from the cast start point. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a shape cast, returning all hits.
start | The cast start, in a 2D world space. |
rotation | The rotation of the shape, in radians. |
shape | The 2D shape to be casted. |
translation | The cast direction and distance, from the cast start point. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a shape cast, adding all hits to a persistent collection.
collection | A previously allocated persistent HitCollection, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection. |
start | The cast start, in a 2D world space. |
rotation | The rotation of the shape, in radians. |
shape | The 2D shape to be casted. |
translation | The cast direction and distance, from the cast start point. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
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.
transform | A 2D transform component, with Position and Rotation info of the shape overlap. |
transformVertical | A vertical transform component, with Vertical Position and Height info of the shape overlap on a 2.5D context. |
shape | The 2D shape to be overlapped. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
When using a vertical transform, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
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.
transform | A 2D transform component, with Position and Rotation info of the shape overlap. |
shape | The 2D shape to be overlapped. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
|
inline |
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.
position | The position in which the shape is overlapped. |
rotation | The rotation of the shape, in radians. |
shape | The 2D shape to be overlapped. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a shape overlap.
collection | A previously allocated persistent HitCollection, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection. |
transform | A 2D transform component, with Position and Rotation info of the shape overlap. |
transformVertical | A vertical transform component, with Vertical Position and Height info of the shape overlap on a 2.5D context. |
shape | The 2D shape to be overlapped. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
InvalidOperationException | Thrown if the hit collection is not persistent. |
When using vertical transform, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a shape overlap.
collection | A previously allocated persistent HitCollection, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection. |
transform | A 2D transform component, with Position and Rotation info of the shape overlap. |
shape | The 2D shape to be overlapped. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
InvalidOperationException | Thrown if the hit collection is not persistent. |
|
inline |
Queries the 2D physics scene with a shape overlap.
collection | A previously allocated persistent HitCollection, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection. |
position | The position in which the shape is overlapped. |
rotation | The rotation of the shape, in radians. |
shape | The 2D shape to be overlapped. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
InvalidOperationException | Thrown if the hit collection is not persistent. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a shape overlap.
transform | A 2D transform component, with Position and Rotation info of the shape overlap. |
transformVertical | A vertical transform component, with Vertical Position and Height info of the shape overlap on a 2.5D context. |
shape | The 2D shape to be overlapped. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
When using vertical transform, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inline |
Queries the 2D physics scene with a shape overlap.
transform | A 2D transform component, with Position and Rotation info of the shape overlap. |
shape | The 2D shape to be overlapped. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
|
inline |
Queries the 2D physics scene with a shape overlap.
position | The position in which the shape is overlapped. |
rotation | The rotation of the shape, in radians. |
shape | The 2D shape to be overlapped. |
layerMask | A mask that specifies which layers will be checked against. By default, all layers are considered. To create a layer mask, see LayerInfo.GetLayerMask(string) and overloads on the frame.Layers property. |
options | The QueryOptions used by the query. By default, all types of colliders are checked against and detailed info (hit point, penetration and normal) is not computed. |
verticalPosition | The position of the query on the vertical axis, on a 2.5D context. |
verticalHeight | The height of the query from the vertical position on the positive sense of the vertical axis. |
If using vertical position and/or height, make sure "Use Vertical Transform" is set on the Simulation Config.
|
inlinestatic |
Creates a dynamic PhysicsBody2D.
mass | The mass of the physics body. |
drag | The drag of the physics body. |
angularDrag | The angular drag of the physics body. |
allowSleeping | Allows the physics body to sleep. |
awakenByKinematics | Allows the physics body to be awaken by an interaction with kinematic bodies. |
freezeRotation | Freezes rotation of the physics body. |
centerOfMass | The center of mass position relative to the transform's origin. |
gravityScale | The multiplier for the gravity force applied for this physics body. |
|
inlinestatic |
Creates a kinematic PhysicsBody2D. The mass, drag and angular drag are not considered in kinematic interactions and have 0 as value.
|
inline |
Initializes a PhysicsBody2D component with custom settings.
bodyMass | The mass of the physics body. |
drag | The drag of the physics body. |
angularDrag | The angular drag of the physics body. |
bodyConfig | The ConfigFlags used in the physics body. |
centerOfMass | The center of mass position relative to the transform's origin. |
gravityScale | The multiplier for the gravity force applied for this physics body. |
void Quantum.ISignalOnCollision2D.OnCollision2D | ( | Frame | f, |
CollisionInfo2D | info | ||
) |
Called once per frame while two non-trigger 2D colliders are touching.
f | The frame in which the collision happened. |
info | The CollisionInfo2D with data about the collision. |
void Quantum.ISignalOnCollisionEnter2D.OnCollisionEnter2D | ( | Frame | f, |
CollisionInfo2D | info | ||
) |
Called once two non-trigger 2D colliders start touching.
f | The frame in which the collision happened. |
info | The CollisionInfo2D with data about the collision. |
void Quantum.ISignalOnCollisionExit2D.OnCollisionExit2D | ( | Frame | f, |
ExitInfo2D | info | ||
) |
Called once two non-trigger 2D colliders stop touching.
f | The frame in which the entities stopped touching. |
info | The ExitInfo2D with the entities that were touching. |
void Quantum.ISignalOnTrigger2D.OnTrigger2D | ( | Frame | f, |
TriggerInfo2D | info | ||
) |
Called once per frame while a non-trigger and a trigger 2D colliders are touching.
f | The frame in which the collision happened. |
info | The TriggerInfo2D with data about the trigger collision. |
void Quantum.ISignalOnTriggerEnter2D.OnTriggerEnter2D | ( | Frame | f, |
TriggerInfo2D | info | ||
) |
Called once a non-trigger and a trigger 2D colliders start touching.
f | The frame in which the collision happened. |
info | The TriggerInfo2D with data about the trigger collision. |
void Quantum.ISignalOnTriggerExit2D.OnTriggerExit2D | ( | Frame | f, |
ExitInfo2D | info | ||
) |
Called once a non-trigger and a trigger 2D colliders stop touching.
f | The frame in which the entities stopped touching. |
info | The ExitInfo2D with the entities that were touching. |