UnityEngine.Physics2DModule Parent class for all joints that have anchor points. The joint's anchor point on the object that has the joint component. Should the connectedAnchor be calculated automatically? The joint's anchor point on the second object (ie, the one which doesn't have the joint component). Applies forces within an area. The angular drag to apply to rigid-bodies. The linear drag to apply to rigid-bodies. The angle of the force to be applied. The magnitude of the force to be applied. The target for where the effector applies any force. The variation of the magnitude of the force to be applied. Should the forceAngle use global space? Collider for 2D physics representing an axis-aligned rectangle. Determines whether the BoxCollider2D's shape is automatically updated based on a SpriteRenderer's tiling properties. Controls the radius of all edges created by the collider. The width and height of the rectangle. Applies forces to simulate buoyancy, fluid-flow and fluid drag. A force applied to slow angular movement of any Collider2D in contact with the effector. The density of the fluid used to calculate the buoyancy forces. The angle of the force used to similate fluid flow. The magnitude of the force used to similate fluid flow. The random variation of the force used to similate fluid flow. A force applied to slow linear movement of any Collider2D in contact with the effector. Defines an arbitrary horizontal line that represents the fluid surface level. A capsule-shaped primitive collider. The direction that the capsule sides can extend. The width and height of the capsule area. The direction that the capsule sides can extend. The capsule sides extend horizontally. The capsule sides extend vertically. Collider for 2D physics representing an circle. Radius of the circle. Parent class for collider types used with 2D gameplay. The Rigidbody2D attached to the Collider2D. Get the bounciness used by the collider. The world space bounding area of the collider. Get the CompositeCollider2D that is available to be attached to the collider. The density of the collider used to calculate its mass (when auto mass is enabled). Get the friction used by the collider. Is this collider configured as a trigger? The local offset of the collider geometry. The number of separate shaped regions in the collider. The PhysicsMaterial2D that is applied to this collider. Sets whether the Collider will be used or not used by a CompositeCollider2D. Whether the collider is used by an attached effector or not. Casts the collider shape into the scene starting at the collider position ignoring the collider itself. Vector representing the direction to cast the shape. Array to receive results. Maximum distance over which to cast the shape. Should colliders attached to the same Rigidbody2D (known as sibling colliders) be ignored? The number of results returned. Casts the collider shape into the scene starting at the collider position ignoring the collider itself. Vector representing the direction to cast the shape. Filter results defined by the contact filter. Array to receive results. Maximum distance over which to cast the shape. Should colliders attached to the same Rigidbody2D (known as sibling colliders) be ignored? The number of results returned. Calculates the minimum separation of this collider against another collider. A collider used to calculate the minimum separation against this collider. The minimum separation of collider and this collider. Retrieves all contact points for this collider. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Retrieves all colliders in contact with this collider. An array of Collider2D used to receive the results. Returns the number of contacts placed in the colliders array. Retrieves all contact points for this collider, with the results filtered by the ContactFilter2D. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Retrieves all colliders in contact with this collider, with the results filtered by the ContactFilter2D. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. An array of Collider2D used to receive the results. Returns the number of collidersplaced in the colliders array. Check whether this collider is touching the collider or not. The collider to check if it is touching this collider. Whether this collider is touching the collider or not. Check whether this collider is touching the collider or not with the results filtered by the ContactFilter2D. The collider to check if it is touching this collider. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. Whether this collider is touching the collider or not. Check whether this collider is touching other colliders or not with the results filtered by the ContactFilter2D. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. Whether this collider is touching the collider or not. Checks whether this collider is touching any colliders on the specified layerMask or not. Any colliders on any of these layers count as touching. Whether this collider is touching any collider on the specified layerMask or not. Get a list of all colliders that overlap this collider. The contact filter used to filter the results differently, such as by layer mask, Z depth. Note that normal angle is not used for overlap testing. The array to receive results. The size of the array determines the maximum number of results that can be returned. Returns the number of results placed in the results array. Check if a collider overlaps a point in space. A point in world space. Does point overlap the collider? Casts a ray into the scene starting at the collider position ignoring the collider itself. Vector representing the direction of the ray. Array to receive results. Maximum distance over which to cast the ray. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. Filter results defined by the contact filter. The number of results returned. Casts a ray into the scene starting at the collider position ignoring the collider itself. Vector representing the direction of the ray. Array to receive results. Maximum distance over which to cast the ray. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. Filter results defined by the contact filter. The number of results returned. Represents the separation or overlap of two Collider2D. Gets the distance between two colliders. Gets whether the distance represents an overlap or not. Gets whether the distance is valid or not. A normalized vector that points from pointB to pointA. A point on a Collider2D that is a specific distance away from pointB. A point on a Collider2D that is a specific distance away from pointA. Collision details returned by 2D physics callback functions. The incoming Collider2D involved in the collision with the otherCollider. Gets the number of contacts for this collision. The specific points of contact with the incoming Collider2D. You should avoid using this as it produces memory garbage. Use GetContact or GetContacts instead. Indicates whether the collision response or reaction is enabled or disabled. The incoming GameObject involved in the collision. The other Collider2D involved in the collision with the collider. The other Rigidbody2D involved in the collision with the rigidbody. The relative linear velocity of the two colliding objects (Read Only). The incoming Rigidbody2D involved in the collision with the otherRigidbody. The Transform of the incoming object involved in the collision. Gets the contact point at the specified index. The index of the contact to retrieve. The contact at the specified index. Retrieves all contact points in for contacts between collider and otherCollider. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Controls how collisions are detected when a Rigidbody2D moves. Ensures that all collisions are detected when a Rigidbody2D moves. When a Rigidbody2D moves, only collisions at the new position are detected. This mode is obsolete. You should use Discrete mode. A Collider that can merge other Colliders together. Controls the radius of all edges created by the Collider. Specifies when to generate the Composite Collider geometry. Specifies the type of geometry the Composite Collider should generate. The number of paths in the Collider. Gets the total number of points in all the paths within the Collider. Controls the minimum distance allowed between generated vertices. Regenerates the Composite Collider geometry. Specifies when to generate the Composite Collider geometry. Sets the Composite Collider geometry to not automatically update when a Collider used by the Composite Collider changes. Sets the Composite Collider geometry to update synchronously immediately when a Collider used by the Composite Collider changes. Specifies the type of geometry the Composite Collider generates. Sets the Composite Collider to generate closed outlines for the merged Collider geometry consisting of only edges. Sets the Composite Collider to generate closed outlines for the merged Collider geometry consisting of convex polygon shapes. Gets a path from the Collider by its index. The index of the path from 0 to pathCount. An ordered array of the vertices or points in the selected path. Returns the number of points placed in the points array. Gets the number of points in the specified path from the Collider by its index. The index of the path from 0 to pathCount. Returns the number of points in the path specified by index. Applies both linear and angular (torque) forces continuously to the rigidbody each physics update. The linear force applied to the rigidbody each physics update. The linear force, relative to the rigid-body coordinate system, applied each physics update. The torque applied to the rigidbody each physics update. A set of parameters for filtering contact results. Given the current state of the contact filter, determine whether it would filter anything. Sets the contact filter to filter the results that only include Collider2D on the layers defined by the layer mask. Sets the contact filter to filter the results to only include Collider2D with a Z coordinate (depth) less than this value. Sets the contact filter to filter the results to only include contacts with collision normal angles that are less than this angle. Sets the contact filter to filter the results to only include Collider2D with a Z coordinate (depth) greater than this value. Sets the contact filter to filter the results to only include contacts with collision normal angles that are greater than this angle. Sets the contact filter to filter the results by depth using minDepth and maxDepth. Sets the contact filter to filter results by layer mask. Sets the contact filter to filter the results by the collision's normal angle using minNormalAngle and maxNormalAngle. Sets the contact filter to filter within the minDepth and maxDepth range, or outside that range. Sets the contact filter to filter within the minNormalAngle and maxNormalAngle range, or outside that range. Sets to filter contact results based on trigger collider involvement. Turns off depth filtering by setting useDepth to false. The associated values of minDepth and maxDepth are not changed. Turns off layer mask filtering by setting useLayerMask to false. The associated value of layerMask is not changed. Turns off normal angle filtering by setting useNormalAngle to false. The associated values of minNormalAngle and maxNormalAngle are not changed. Checks if the Transform for obj is within the depth range to be filtered. The GameObject used to check the z-position (depth) of Transform.position. Returns true when obj is excluded by the filter and false if otherwise. Checks if the GameObject.layer for obj is included in the layerMask to be filtered. The GameObject used to check the GameObject.layer. Returns true when obj is excluded by the filter and false if otherwise. Checks if the angle of normal is within the normal angle range to be filtered. The normal used to calculate an angle. Returns true when normal is excluded by the filter and false if otherwise. Checks if the angle is within the normal angle range to be filtered. The angle used for comparison in the filter. Returns true when angle is excluded by the filter and false if otherwise. Checks if the collider is a trigger and should be filtered by the useTriggers to be filtered. The Collider2D used to check for a trigger. Returns true when collider is excluded by the filter and false if otherwise. Sets the contact filter to not filter any ContactPoint2D. A copy of the contact filter set to not filter any ContactPoint2D. Sets the minDepth and maxDepth filter properties and turns on depth filtering by setting useDepth to true. The value used to set minDepth. The value used to set maxDepth. Sets the layerMask filter property using the layerMask parameter provided and also enables layer mask filtering by setting useLayerMask to true. The value used to set the layerMask. Sets the minNormalAngle and maxNormalAngle filter properties and turns on normal angle filtering by setting useNormalAngle to true. The value used to set the minNormalAngle. The value used to set the maxNormalAngle. Details about a specific point of contact involved in a 2D physics collision. The incoming Collider2D involved in the collision with the otherCollider. Indicates whether the collision response or reaction is enabled or disabled. Surface normal at the contact point. Gets the impulse force applied at the contact point along the ContactPoint2D.normal. The other Collider2D involved in the collision with the collider. The other Rigidbody2D involved in the collision with the rigidbody. The point of contact between the two colliders in world space. Gets the relative velocity of the two colliders at the contact point (Read Only). The incoming Rigidbody2D involved in the collision with the otherRigidbody. Gets the distance between the colliders at the contact point. Gets the impulse force applied at the contact point which is perpendicular to the ContactPoint2D.normal. Joint that keeps two Rigidbody2D objects a fixed distance apart. Should the distance be calculated automatically? The distance separating the two ends of the joint. Whether to maintain a maximum distance only or not. If not then the absolute distance will be maintained instead. Collider for 2D physics representing an arbitrary set of connected edges (lines) defined by its vertices. Gets the number of edges. Controls the radius of all edges created by the collider. Gets the number of points. Get or set the points defining multiple continuous edges. Reset to a single edge consisting of two points. A base class for all 2D effectors. The mask used to select specific layers allowed to interact with the effector. Should the collider-mask be used or the global collision matrix? The mode used to apply Effector2D forces. The force is applied at a constant rate. The force is applied inverse-linear relative to a point. The force is applied inverse-squared relative to a point. Selects the source and/or target to be used by an Effector2D. The source/target is defined by the Collider2D. The source/target is defined by the Rigidbody2D. Connects two Rigidbody2D together at their anchor points using a configurable spring. The amount by which the spring force is reduced in proportion to the movement speed. The frequency at which the spring oscillates around the distance between the objects. The angle referenced between the two bodies used as the constraint for the joint. Option for how to apply a force using Rigidbody2D.AddForce. Add a force to the Rigidbody2D, using its mass. Add an instant force impulse to the rigidbody2D, using its mass. Applies both force and torque to reduce both the linear and angular velocities to zero. The maximum force that can be generated when trying to maintain the friction joint constraint. The maximum torque that can be generated when trying to maintain the friction joint constraint. Joint that allows a Rigidbody2D object to rotate around a point in space or a point on another object. The current joint angle (in degrees) with respect to the reference angle. The current joint speed. Limit of angular rotation (in degrees) on the joint. Gets the state of the joint limit. Parameters for the motor force applied to the joint. The angle (in degrees) referenced between the two bodies used as the constraint for the joint. Should limits be placed on the range of rotation? Should the joint be rotated automatically by a motor torque? Gets the motor torque of the joint given the specified timestep. The time to calculate the motor torque for. Parent class for joints to connect Rigidbody2D objects. The Rigidbody2D attached to the Joint2D. The force that needs to be applied for this joint to break. The torque that needs to be applied for this joint to break. The Rigidbody2D object to which the other end of the joint is attached (ie, the object without the joint component). Should the two rigid bodies connected with this joint collide with each other? Gets the reaction force of the joint. Gets the reaction torque of the joint. Gets the reaction force of the joint given the specified timeStep. The time to calculate the reaction force for. The reaction force of the joint in the specified timeStep. Gets the reaction torque of the joint given the specified timeStep. The time to calculate the reaction torque for. The reaction torque of the joint in the specified timeStep. Angular limits on the rotation of a Rigidbody2D object around a HingeJoint2D. Upper angular limit of rotation. Lower angular limit of rotation. Represents the state of a joint limit. Represents a state where the joint limit is at the specified lower and upper limits (they are identical). Represents a state where the joint limit is inactive. Represents a state where the joint limit is at the specified lower limit. Represents a state where the joint limit is at the specified upper limit. Parameters for the optional motor force applied to a Joint2D. The maximum force that can be applied to the Rigidbody2D at the joint to attain the target speed. The desired speed for the Rigidbody2D to reach as it moves with the joint. Joint suspension is used to define how suspension works on a WheelJoint2D. The world angle (in degrees) along which the suspension will move. The amount by which the suspension spring force is reduced in proportion to the movement speed. The frequency at which the suspension spring oscillates. Motion limits of a Rigidbody2D object along a SliderJoint2D. Maximum distance the Rigidbody2D object can move from the Slider Joint's anchor. Minimum distance the Rigidbody2D object can move from the Slider Joint's anchor. Global settings and helpers for 2D physics. Should the collider gizmos always be shown even when they are not selected? A rigid-body cannot sleep if its angular velocity is above this tolerance. Sets whether the physics should be simulated automatically or not. Whether or not to automatically sync transform changes with the physics system whenever a Transform component changes. The scale factor that controls how fast overlaps are resolved. The scale factor that controls how fast TOI overlaps are resolved. Use this to control whether or not the appropriate OnCollisionExit2D or OnTriggerExit2D callbacks should be called when a Collider2D is disabled. Sets the color used by the gizmos to show all Collider axis-aligned bounding boxes (AABBs). The color used by the gizmos to show all asleep colliders (collider is asleep when the body is asleep). The color used by the gizmos to show all awake colliders (collider is awake when the body is awake). The color used by the gizmos to show all collider contacts. The scale of the contact arrow used by the collider gizmos. The default contact offset of the newly created colliders. Acceleration due to gravity. A set of options that control how physics operates when using the job system to multithread the physics simulation. A rigid-body cannot sleep if its linear velocity is above this tolerance. The maximum angular position correction used when solving constraints. This helps to prevent overshoot. The maximum linear position correction used when solving constraints. This helps to prevent overshoot. The maximum angular speed of a rigid-body per physics update. Increasing this can cause numerical problems. The maximum linear speed of a rigid-body per physics update. Increasing this can cause numerical problems. The number of iterations of the physics solver when considering objects' positions. Do raycasts detect Colliders configured as triggers? Sets the raycasts or linecasts that start inside Colliders to detect or not detect those Colliders. Should the collider gizmos show the AABBs for each collider? Should the collider gizmos show current contacts for each collider? Should the collider gizmos show the sleep-state for each collider? The time in seconds that a rigid-body must be still before it will go to sleep. The number of iterations of the physics solver when considering objects' velocities. Any collisions with a relative linear velocity below this threshold will be treated as inelastic. Layer mask constant that includes all layers. Casts a box against colliders in the scene, returning the first collider to contact with it. The point in 2D space where the box originates. The size of the box. The angle of the box (in degrees). Vector representing the direction of the box. Maximum distance over which to cast the box. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results returned. Casts a box against the colliders in the Scene and returns all colliders that are in contact with it. The point in 2D space where the box originates. The size of the box. The angle of the box (in degrees). Vector representing the direction of the box. Maximum distance over which to cast the box. The array to receive results. The size of the array determines the maximum number of results that can be returned. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. Returns the number of results placed in the results array. Casts a box against colliders in the scene, returning all colliders that contact with it. The point in 2D space where the box originates. The size of the box. The angle of the box (in degrees). Vector representing the direction of the box. Maximum distance over which to cast the box. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results returned. Casts a box into the scene, returning colliders that contact with it into the provided results array. The point in 2D space where the box originates. The size of the box. The angle of the box (in degrees). Vector representing the direction of the box. Array to receive results. Maximum distance over which to cast the box. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. Returns the number of results placed in the results array. Casts a capsule against colliders in the scene, returning the first collider to contact with it. The point in 2D space where the capsule originates. The size of the capsule. The direction of the capsule. The angle of the capsule (in degrees). Vector representing the direction to cast the capsule. Maximum distance over which to cast the capsule. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. The cast results returned. Casts a capsule against the colliders in the Scene and returns all colliders that are in contact with it. The point in 2D space where the capsule originates. The size of the capsule. The direction of the capsule. The angle of the capsule (in degrees). Vector representing the direction to cast the capsule. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. The array to receive results. The size of the array determines the maximum number of results that can be returned. Maximum distance over which to cast the capsule. Returns the number of results placed in the results array. Casts a capsule against colliders in the scene, returning all colliders that contact with it. The point in 2D space where the capsule originates. The size of the capsule. The direction of the capsule. The angle of the capsule (in degrees). Vector representing the direction to cast the capsule. Maximum distance over which to cast the capsule. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. The cast results returned. Casts a capsule into the scene, returning colliders that contact with it into the provided results array. The point in 2D space where the capsule originates. The size of the capsule. The direction of the capsule. The angle of the capsule (in degrees). Vector representing the direction to cast the capsule. Array to receive results. Maximum distance over which to cast the capsule. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. Returns the number of results placed in the results array. Casts a circle against colliders in the scene, returning the first collider to contact with it. The point in 2D space where the circle originates. The radius of the circle. Vector representing the direction of the circle. Maximum distance over which to cast the circle. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results returned. Casts a circle against colliders in the Scene, returning all colliders that contact with it. The point in 2D space where the circle originates. The radius of the circle. Vector representing the direction of the circle. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. The array to receive results. The size of the array determines the maximum number of results that can be returned. Maximum distance over which to cast the circle. Returns the number of results placed in the results array. Casts a circle against colliders in the scene, returning all colliders that contact with it. The point in 2D space where the circle originates. The radius of the circle. Vector representing the direction of the circle. Maximum distance over which to cast the circle. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results returned. Casts a circle into the scene, returning colliders that contact with it into the provided results array. The point in 2D space where the circle originates. The radius of the circle. Vector representing the direction of the circle. Array to receive results. Maximum distance over which to cast the circle. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. Returns the number of results placed in the results array. Layer mask constant that includes all layers participating in raycasts by default. Calculates the minimum distance between two colliders. A collider used to calculate the minimum distance against colliderB. A collider used to calculate the minimum distance against colliderA. The minimum distance between colliderA and colliderB. Retrieves all colliders in contact with the collider. The collider to retrieve contacts for. An array of Collider2D used to receive the results. Returns the number of colliders placed in the colliders array. Retrieves all contact points in contact with the collider. The collider to retrieve contacts for. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Retrieves all contact points in contact with the collider, with the results filtered by the ContactFilter2D. The collider to retrieve contacts for. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Retrieves all colliders in contact with the collider, with the results filtered by the ContactFilter2D. The collider to retrieve contacts for. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. An array of Collider2D used to receive the results. Returns the number of colliders placed in the colliders array. Retrieves all contact points in for contacts between with the collider1 and collider2, with the results filtered by the ContactFilter2D. The collider to check if it has contacts against collider2. The collider to check if it has contacts against collider1. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Retrieves all contact points in contact with any of the collider(s) attached to this rigidbody. The rigidbody to retrieve contacts for. All colliders attached to this rigidbody will be checked. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Retrieves all colliders in contact with any of the collider(s) attached to this rigidbody. The rigidbody to retrieve contacts for. All colliders attached to this rigidbody will be checked. An array of Collider2D used to receive the results. Returns the number of colliders placed in the colliders array. Retrieves all contact points in contact with any of the collider(s) attached to this rigidbody, with the results filtered by the ContactFilter2D. The rigidbody to retrieve contacts for. All colliders attached to this rigidbody will be checked. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Retrieves all colliders in contact with any of the collider(s) attached to this rigidbody, with the results filtered by the ContactFilter2D. The rigidbody to retrieve contacts for. All colliders attached to this rigidbody will be checked. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. An array of Collider2D used to receive the results. Returns the number of colliders placed in the colliders array. Checks whether the collision detection system will ignore all collisionstriggers between collider1 and collider2/ or not. The first collider to compare to collider2. The second collider to compare to collider1. Whether the collision detection system will ignore all collisionstriggers between collider1 and collider2/ or not. Checks whether collisions between the specified layers be ignored or not. ID of first layer. ID of second layer. Whether collisions between the specified layers be ignored or not. Get the collision layer mask that indicates which layer(s) the specified layer can collide with. The layer to retrieve the collision layer mask for. A mask where each bit indicates a layer and whether it can collide with layer or not. Cast a 3D ray against the colliders in the scene returning the first collider along the ray. The 3D ray defining origin and direction to test. Maximum distance over which to cast the ray. Filter to detect colliders only on certain layers. The cast results returned. Cast a 3D ray against the colliders in the scene returning all the colliders along the ray. The 3D ray defining origin and direction to test. Maximum distance over which to cast the ray. Filter to detect colliders only on certain layers. The cast results returned. Cast a 3D ray against the colliders in the scene returning the colliders along the ray. The 3D ray defining origin and direction to test. Maximum distance over which to cast the ray. Filter to detect colliders only on certain layers. Array to receive results. The number of results returned. Makes the collision detection system ignore all collisionstriggers between collider1 and collider2/. The first collider to compare to collider2. The second collider to compare to collider1. Whether collisionstriggers between collider1 and collider2/ should be ignored or not. Choose whether to detect or ignore collisions between a specified pair of layers. ID of the first layer. ID of the second layer. Should collisions between these layers be ignored? Layer mask constant for the default layer that ignores raycasts. Checks whether the passed colliders are in contact or not. The collider to check if it is touching collider2. The collider to check if it is touching collider1. Whether collider1 is touching collider2 or not. Checks whether the passed colliders are in contact or not. The collider to check if it is touching any other collider filtered by the contactFilter. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. Whether the collider is touching any other collider filtered by the contactFilter or not. Checks whether the passed colliders are in contact or not. The collider to check if it is touching collider2. The collider to check if it is touching collider1. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. Whether collider1 is touching collider2 or not. Checks whether the collider is touching any colliders on the specified layerMask or not. The collider to check if it is touching colliders on the layerMask. Any colliders on any of these layers count as touching. Whether the collider is touching any colliders on the specified layerMask or not. Casts a line segment against colliders in the Scene. The start point of the line in world space. The end point of the line in world space. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results returned. Casts a line segment against colliders in the Scene with results filtered by ContactFilter2D. The start point of the line in world space. The end point of the line in world space. The array to receive results. The size of the array determines the maximum number of results that can be returned. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. Returns the number of results placed in the results array. Casts a line against colliders in the scene. The start point of the line in world space. The end point of the line in world space. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results returned. Casts a line against colliders in the scene. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The start point of the line in world space. The end point of the line in world space. Returned array of objects that intersect the line. Filter to detect Colliders only on certain layers. Returns the number of results placed in the results array. Checks if a collider falls within a rectangular area. One corner of the rectangle. Diagonally opposite the point A corner of the rectangle. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The collider overlapping the area. Checks if a collider falls within a rectangular area. One corner of the rectangle. Diagonally opposite the point A corner of the rectangle. The array to receive results. The size of the array determines the maximum number of results that can be returned. The contact filter used to filter the results differently, such as by layer mask, Z depth. Note that normal angle is not used for overlap testing. Returns the number of results placed in the results array. Get a list of all colliders that fall within a rectangular area. One corner of the rectangle. Diagonally opposite the point A corner of the rectangle. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results returned. Get a list of all colliders that fall within a specified area. One corner of the rectangle. Diagonally opposite the point A corner of the rectangle. Array to receive results. Filter to check objects only on specified layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. Returns the number of results placed in the results array. Checks if a collider falls within a box area. Center of the box. Size of the box. Angle of the box. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. The collider overlapping the box. Checks if a collider falls within a box area. Center of the box. Size of the box. Angle of the box. The contact filter used to filter the results differently, such as by layer mask, Z depth. Note that normal angle is not used for overlap testing. The array to receive results. The size of the array determines the maximum number of results that can be returned. Returns the number of results placed in the results array. Get a list of all colliders that fall within a box area. Center of the box. Size of the box. Angle of the box. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. The cast results returned. Get a list of all colliders that fall within a box area. Center of the box. Size of the box. Angle of the box. Array to receive results. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. Returns the number of results placed in the results array. Checks if a collider falls within a capsule area. Center of the capsule. Size of the capsule. The direction of the capsule. Angle of the capsule. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. The collider overlapping the capsule. Checks if a collider falls within a capsule area. Center of the capsule. Size of the capsule. The direction of the capsule. Angle of the capsule. The contact filter used to filter the results differently, such as by layer mask, Z depth. Note that normal angle is not used for overlap testing. The array to receive results. The size of the array determines the maximum number of results that can be returned. Returns the number of results placed in the results array. Get a list of all colliders that fall within a capsule area. Center of the capsule. Size of the capsule. The direction of the capsule. Angle of the capsule. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. The cast results returned. Get a list of all colliders that fall within a capsule area. Center of the capsule. Size of the capsule. The direction of the capsule. Angle of the capsule. Array to receive results. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than this value. Only include objects with a Z coordinate (depth) less than this value. Returns the number of results placed in the results array. Checks if a collider falls within a circular area. Centre of the circle. Radius of the circle. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The collider overlapping the circle. Checks if a collider is within a circular area. Centre of the circle. Radius of the circle. The contact filter used to filter the results differently, such as by layer mask, Z depth. Note that normal angle is not used for overlap testing. The array to receive results. The size of the array determines the maximum number of results that can be returned. Returns the number of results placed in the results array. Get a list of all colliders that fall within a circular area. Center of the circle. Radius of the circle. Filter to check objects only on specified layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results. Get a list of all colliders that fall within a circular area. Center of the circle. Radius of the circle. Array to receive results. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. Returns the number of results placed in the results array. Get a list of all colliders that overlap collider. The collider that defines the area used to query for other collider overlaps. The contact filter used to filter the results differently, such as by layer mask, Z depth. Note that normal angle is not used for overlap testing. The array to receive results. The size of the array determines the maximum number of results that can be returned. Returns the number of results placed in the results array. Checks if a collider overlaps a point in space. A point in world space. Filter to check objects only on specific layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The collider overlapping the point. Checks if a collider overlaps a point in world space. A point in world space. The contact filter used to filter the results differently, such as by layer mask, Z depth. Note that normal angle is not used for overlap testing. The array to receive results. The size of the array determines the maximum number of results that can be returned. Returns the number of results placed in the results array. Get a list of all colliders that overlap a point in space. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. A point in space. Filter to check objects only on specific layers. The cast results returned. Get a list of all colliders that overlap a point in space. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. A point in space. Array to receive results. Filter to check objects only on specific layers. Returns the number of results placed in the results array. Casts a ray against colliders in the scene. The point in 2D space where the ray originates. The vector representing the direction of the ray. Maximum distance over which to cast the ray. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results returned. Casts a ray against colliders in the Scene. The point in 2D space where the ray originates. The vector representing the direction of the ray. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. The array to receive results. The size of the array determines the maximum number of results that can be returned. Maximum distance over which to cast the ray. Returns the number of results placed in the results array. Casts a ray against colliders in the scene, returning all colliders that contact with it. The point in 2D space where the ray originates. The vector representing the direction of the ray. Maximum distance over which to cast the ray. Filter to detect Colliders only on certain layers. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The cast results returned. Casts a ray into the scene. Only include objects with a Z coordinate (depth) greater than or equal to this value. Only include objects with a Z coordinate (depth) less than or equal to this value. The point in 2D space where the ray originates. The vector representing the direction of the ray. Array to receive results. Maximum distance over which to cast the ray. Filter to check objects only on specific layers. Returns the number of results placed in the results array. Set the collision layer mask that indicates which layer(s) the specified layer can collide with. The layer to set the collision layer mask for. A mask where each bit indicates a layer and whether it can collide with layer or not. Simulate physics in the scene. The time to advance physics by. Whether the simulation was run or not. Running the simulation during physics callbacks will always fail. Synchronizes. A set of options that control how physics operates when using the job system to multithread the physics simulation. Controls the minimum number of bodies to be cleared in each simulation job. Controls the minimum number of flags to be cleared in each simulation job. Controls the minimum number of contacts to collide in each simulation job. Controls the minimum number of nearest contacts to find in each simulation job. Controls the minimum number of Rigidbody2D being interpolated in each simulation job. Controls the minimum number of bodies to solve in each simulation job when performing island solving. Scales the cost of each body during discrete island solving. Scales the cost of each contact during discrete island solving. Controls the minimum number of contacts to solve in each simulation job when performing island solving. The minimum threshold cost of all bodies, contacts and joints in an island during discrete island solving. Scales the cost of each joint during discrete island solving. Controls the minimum number of new contacts to find in each simulation job. Controls the minimum number of fixtures to synchronize in the broadphase during continuous island solving in each simulation job. Controls the minimum number of fixtures to synchronize in the broadphase during discrete island solving in each simulation job. Controls the minimum number of trigger contacts to update in each simulation job. Should physics simulation sort multi-threaded results to maintain processing order consistency? Should physics simulation use multithreading? Asset type that defines the surface properties of a Collider2D. The degree of elasticity during collisions. Coefficient of friction. A base type for 2D physics components that required a callback during FixedUpdate. Applies "platform" behaviour such as one-way collisions etc. The rotational offset angle from the local 'up'. The angle of an arc that defines the sides of the platform centered on the local 'left' and 'right' of the effector. Any collision normals within this arc are considered for the 'side' behaviours. The angle of an arc that defines the surface of the platform centered of the local 'up' of the effector. Should the one-way collision behaviour be used? Ensures that all contacts controlled by the one-way behaviour act the same. Should bounce be used on the platform sides? Should friction be used on the platform sides? Applies forces to attract/repulse against a point. The angular drag to apply to rigid-bodies. The scale applied to the calculated distance between source and target. The linear drag to apply to rigid-bodies. The magnitude of the force to be applied. The mode used to apply the effector force. The source which is used to calculate the centroid point of the effector. The distance from the target is defined from this point. The target for where the effector applies any force. The variation of the magnitude of the force to be applied. Collider for 2D physics representing an arbitrary polygon defined by its vertices. Determines whether the PolygonCollider2D's shape is automatically updated based on a SpriteRenderer's tiling properties. The number of paths in the polygon. Corner points that define the collider's shape in local space. Creates as regular primitive polygon with the specified number of sides. The number of sides in the polygon. This must be greater than two. The X/Y scale of the polygon. These must be greater than zero. The X/Y offset of the polygon. Gets a path from the Collider by its index. The index of the path to retrieve. An ordered array of the vertices or points in the selected path. Return the total number of points in the polygon in all paths. Define a path by its constituent points. Index of the path to set. Points that define the path. Information returned about an object detected by a raycast in 2D physics. The centroid of the primitive used to perform the cast. The collider hit by the ray. The distance from the ray origin to the impact point. Fraction of the distance along the ray that the hit occurred. The normal vector of the surface hit by the ray. The point in world space where the ray hit the collider's surface. The Rigidbody2D attached to the object that was hit. The Transform of the object that was hit. Keeps two Rigidbody2D at their relative orientations. The current angular offset between the Rigidbody2D that the joint connects. Should both the linearOffset and angularOffset be calculated automatically? Scales both the linear and angular forces used to correct the required relative orientation. The current linear offset between the Rigidbody2D that the joint connects. The maximum force that can be generated when trying to maintain the relative joint constraint. The maximum torque that can be generated when trying to maintain the relative joint constraint. The world-space position that is currently trying to be maintained. Rigidbody physics component for 2D sprites. Coefficient of angular drag. Angular velocity in degrees per second. Returns the number of Collider2D attached to this Rigidbody2D. The physical behaviour type of the Rigidbody2D. The center of mass of the rigidBody in local space. The method used by the physics engine to check if two objects have collided. Controls which degrees of freedom are allowed for the simulation of this Rigidbody2D. Coefficient of drag. Should the rigidbody be prevented from rotating? Controls whether physics will change the rotation of the object. The degree to which this object is affected by gravity. The rigidBody rotational inertia. Physics interpolation used between updates. Should this rigidbody be taken out of physics control? Mass of the Rigidbody. The position of the rigidbody. The rotation of the rigidbody. The PhysicsMaterial2D that is applied to all Collider2D attached to this Rigidbody2D. Indicates whether the rigid body should be simulated or not by the physics system. The sleep state that the rigidbody will initially be in. Should the total rigid-body mass be automatically calculated from the Collider2D.density of attached colliders? Should kinematickinematic and kinematicstatic collisions be allowed? Linear velocity of the rigidbody. Gets the center of mass of the rigidBody in global space. Apply a force to the rigidbody. Components of the force in the X and Y axes. The method used to apply the specified force. Apply a force at a given position in space. Components of the force in the X and Y axes. Position in world space to apply the force. The method used to apply the specified force. Adds a force to the rigidbody2D relative to its coordinate system. Components of the force in the X and Y axes. The method used to apply the specified force. Apply a torque at the rigidbody's centre of mass. Torque to apply. The force mode to use. All the Collider2D shapes attached to the Rigidbody2D are cast into the scene starting at each collider position ignoring the colliders attached to the same Rigidbody2D. Vector representing the direction to cast each Collider2D shape. Array to receive results. Maximum distance over which to cast the shape(s). The number of results returned. All the Collider2D shapes attached to the Rigidbody2D are cast into the scene starting at each collider position ignoring the colliders attached to the same Rigidbody2D. Vector representing the direction to cast each Collider2D shape. Filter results defined by the contact filter. Array to receive results. Maximum distance over which to cast the shape(s). The number of results returned. Calculates the minimum distance of this collider against all Collider2D attached to this Rigidbody2D. A collider used to calculate the minimum distance against all colliders attached to this Rigidbody2D. The minimum distance of collider against all colliders attached to this Rigidbody2D. Returns all Collider2D that are attached to this Rigidbody2D. An array of Collider2D used to receive the results. Returns the number of Collider2D placed in the results array. Retrieves all contact points for all of the collider(s) attached to this rigidbody. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Retrieves all colliders in contact with any of the collider(s) attached to this rigidbody. An array of Collider2D used to receive the results. Returns the number of colliders placed in the colliders array. Retrieves all contact points for all of the collider(s) attached to this rigidbody, with the results filtered by the ContactFilter2D. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. An array of ContactPoint2D used to receive the results. Returns the number of contacts placed in the contacts array. Retrieves all colliders in contact with any of the collider(s) attached to this rigidbody, with the results filtered by the ContactFilter2D. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. An array of Collider2D used to receive the results. Returns the number of colliders placed in the colliders array. Get a local space point given the point point in rigidBody global space. The global space point to transform into local space. The velocity of the rigidbody at the point Point in global space. The global space point to calculate velocity for. Get a global space point given the point relativePoint in rigidBody local space. The local space point to transform into global space. The velocity of the rigidbody at the point Point in local space. The local space point to calculate velocity for. Get a global space vector given the vector relativeVector in rigidBody local space. The local space vector to transform into a global space vector. Get a local space vector given the vector vector in rigidBody global space. The global space vector to transform into a local space vector. Is the rigidbody "awake"? Is the rigidbody "sleeping"? Checks whether the collider is touching any of the collider(s) attached to this rigidbody or not. The collider to check if it is touching any of the collider(s) attached to this rigidbody. Whether the collider is touching any of the collider(s) attached to this rigidbody or not. Checks whether the collider is touching any of the collider(s) attached to this rigidbody or not with the results filtered by the ContactFilter2D. The collider to check if it is touching any of the collider(s) attached to this rigidbody. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. Whether the collider is touching any of the collider(s) attached to this rigidbody or not. Checks whether any collider is touching any of the collider(s) attached to this rigidbody or not with the results filtered by the ContactFilter2D. The contact filter used to filter the results differently, such as by layer mask, Z depth, or normal angle. Whether any collider is touching any of the collider(s) attached to this rigidbody or not. Checks whether any of the collider(s) attached to this rigidbody are touching any colliders on the specified layerMask or not. Any colliders on any of these layers count as touching. Whether any of the collider(s) attached to this rigidbody are touching any colliders on the specified layerMask or not. Moves the rigidbody to position. The new position for the Rigidbody object. Rotates the rigidbody to angle (given in degrees). The new rotation angle for the Rigidbody object. Get a list of all colliders that overlap all colliders attached to this Rigidbody2D. The contact filter used to filter the results differently, such as by layer mask, Z depth. Note that normal angle is not used for overlap testing. The array to receive results. The size of the array determines the maximum number of results that can be returned. Returns the number of results placed in the results array. Check if any of the Rigidbody2D colliders overlap a point in space. A point in world space. Whether the point overlapped any of the Rigidbody2D colliders. Make the rigidbody "sleep". Disables the "sleeping" state of a rigidbody. Use these flags to constrain motion of the Rigidbody2D. Freeze rotation and motion along all axes. Freeze motion along the X-axis and Y-axis. Freeze motion along the X-axis. Freeze motion along the Y-axis. Freeze rotation along the Z-axis. No constraints. Interpolation mode for Rigidbody2D objects. Smooth an object's movement based on an estimate of its position in the next frame. Smooth movement based on the object's positions in previous frames. Do not apply any smoothing to the object's movement. Settings for a Rigidbody2D's initial sleep state. Rigidbody2D never automatically sleeps. Rigidbody2D is initially asleep. Rigidbody2D is initially awake. The physical behaviour type of the Rigidbody2D. Sets the Rigidbody2D to have dynamic behaviour. Sets the Rigidbody2D to have kinematic behaviour. Sets the Rigidbody2D to have static behaviour. Joint that restricts the motion of a Rigidbody2D object to a single line. The angle of the line in space (in degrees). Should the angle be calculated automatically? The current joint speed. The current joint translation. Restrictions on how far the joint can slide in each direction along the line. Gets the state of the joint limit. Parameters for a motor force that is applied automatically to the Rigibody2D along the line. The angle (in degrees) referenced between the two bodies used as the constraint for the joint. Should motion limits be used? Should a motor force be applied automatically to the Rigidbody2D? Gets the motor force of the joint given the specified timestep. The time to calculate the motor force for. Joint that attempts to keep two Rigidbody2D objects a set distance apart by applying a force between them. Should the distance be calculated automatically? The amount by which the spring force is reduced in proportion to the movement speed. The distance the spring will try to keep between the two objects. The frequency at which the spring oscillates around the distance distance between the objects. Applies tangent forces along the surfaces of colliders. The scale of the impulse force applied while attempting to reach the surface speed. The speed to be maintained along the surface. The speed variation (from zero to the variation) added to base speed to be applied. Should bounce be used for any contact with the surface? Should the impulse force but applied to the contact point? Should friction be used for any contact with the surface? The joint attempts to move a Rigidbody2D to a specific target position. The local-space anchor on the rigid-body the joint is attached to. Should the target be calculated automatically? The amount by which the target spring force is reduced in proportion to the movement speed. The frequency at which the target spring oscillates around the target position. The maximum force that can be generated when trying to maintain the target joint constraint. The world-space position that the joint will attempt to move the body to. The Physics2d module implements 2D physics in Unity. The wheel joint allows the simulation of wheels by providing a constraining suspension motion with an optional motor. The current joint angle (in degrees) defined as the relative angle between the two Rigidbody2D that the joint connects to. The current joint linear speed in meters/sec. The current joint rotational speed in degrees/sec. The current joint translation. Parameters for a motor force that is applied automatically to the Rigibody2D along the line. Set the joint suspension configuration. Should a motor force be applied automatically to the Rigidbody2D? Gets the motor torque of the joint given the specified timestep. The time to calculate the motor torque for.