Describes a collision.
The ArticulationBody of the collider that your GameObject collides with (Read Only).
The Rigidbody or ArticulationBody of the collider that your Component collides with (Read Only).
The Collider we hit (Read Only).
Gets the number of contacts for this collision.
The contact points generated by the physics engine. You should avoid using this as it produces memory garbage. Use GetContact o...
The GameObject whose collider you are colliding with. (Read Only).
Gets the contact point at the specified index.
Retrieves all contact points for this collision.
The total impulse applied to this contact pair to resolve the collision.
The relative linear velocity of the two colliding objects (Read Only).
The Rigidbody we hit (Read Only). This is null if the object we hit is a collider with no rigidbody attached.
The Transform of the object we hit (Read Only).
Script interface for the CollisionModule of a Particle System.
Spawns new particles when particles from the parent system collide with something.
Ensures that all collisions are detected when a Rigidbody2D moves.
Collision details returned by 2D physics callback functions.
Continuous collision detection is on for colliding with static mesh geometry.
Continuous collision detection is off for this Rigidbody.
The incoming Collider2D involved in the collision with the otherCollider.
Gets the number of contacts for this collision.
Indicates whether the collision response or reaction is enabled or disabled.
The incoming GameObject involved in the collision.
Gets the contact point at the specified index.
The other Collider2D involved in the collision with the collider.
The other Rigidbody2D involved in the collision with the rigidbody.
The incoming Rigidbody2D involved in the collision with the otherRigidbody.
The Transform of the incoming object involved in the collision.
The collision detection mode constants used for Rigidbody.collisionDetectionMode.
Continuous collision detection is on for colliding with static and dynamic geometry.
Speculative continuous collision detection is on for static and dynamic geometries
Controls how collisions are detected when a Rigidbody2D moves.
When a Rigidbody2D moves, only collisions at the new position are detected.
Script interface for the CollisionModule of a Particle System.
The specific points of contact with the incoming Collider2D. You should avoid using this as it produces memory garbage. Use Get...
Retrieves all contact points for contacts between collider and otherCollider.
The relative linear velocity of the two colliding objects (Read Only).
This mode is obsolete. You should use Discrete mode.
CollisionFlags is a bitmask returned by CharacterController.Move.
CollisionFlags is a bitmask returned by CharacterController.Move.
CollisionFlags is a bitmask returned by CharacterController.Move.
CollisionFlags is a bitmask returned by CharacterController.Move.
CollisionFlags is a bitmask returned by CharacterController.Move.
How much to increase mass of colliding particles.
The Rigidbody's collision detection mode.
Enable collision between bodies connected with the joint.
The maximum number of collision shapes Unity considers for particle collisions. It ignores excess shapes. Terrains take priority.
A multiplier that Unity applies to the size of each particle before collisions are processed.
Makes the collision detection system ignore all collisions between collider1 and collider2.
The method used by the physics engine to check if two objects have collided.
Should the two Rigidbody2D connected with this joint collide with each other?
Adds a collision plane to use with this Particle System.
How much force is applied to each particle after a collision.
How much force is applied to a Collider when hit by particles from this Particle System.
How much speed does each particle lose after a collision.
Specifies whether the CollisionModule is enabled or disabled.
Allow particles to collide with dynamic colliders when using world collision mode.
Allow particles to collide when inside colliders.
Get a collision plane associated with this Particle System.
How much a collision reduces a particle's lifetime.
Kill particles whose speed goes above this threshold, after a collision.
Kill particles whose speed falls below this threshold, after a collision.
Specifies whether the physics system considers the collision angle when it applies forces from particles to Colliders.
Specifies whether the physics system considers particle sizes when it applies forces to Colliders.
Specifies whether the physics system considers particle speeds when it applies forces to Colliders.
Removes a collision plane associated with this Particle System.
Send collision callback messages.
Set a collision plane to use with this Particle System.
The type of particle collision to perform.
Size of voxels in the collision cache.
The ArticulationBody's collision detection mode.
Choose between 2D and 3D world collisions.
Specifies the accuracy of particle collisions against colliders in the Scene.
Makes the collision detection system ignore all collisions/triggers between collider1 and collider2.
A multiplier for ParticleSystem.CollisionModule._bounce.
Control which Layers this Particle System collides with.
Change the dampen multiplier.
Change the lifetime loss multiplier.
The maximum number of planes it is possible to set as colliders.
Shows the number of planes currently set as Colliders.
Checks whether the collision detection system will ignore all collisions/triggers between collider1 and collider2 or not.
Makes the collision detection system ignore all collisions between any collider in layer1 and any collider in layer2.Note that ...
Checks whether the collision detection system will ignore all collisions/triggers between collider1 and collider2 or not.
What part of the capsule collided with the environment during the last CharacterController.Move call.
Enable continuous collision to improve collision stability.
OnParticleCollision is called when a particle hits a Collider.
Choose whether to detect or ignore collisions between a specified pair of layers.
Definition of a sphere a vertex is not allowed to enter. This allows collision against the animated cloth.
Are collisions between layer1 and layer2 being ignored?
Checks whether collisions between the specified layers be ignored or not.
Sub-Particle System which spawns at the locations of the collision of the particles from the parent system.
Sub-Particle System which spawns at the locations of the collision of the particles from the parent system.
Information about a particle collision.
Intersection point of the collision in world coordinates.
Geometry normal at the intersection point of the collision.
Incident velocity at the intersection point of the collision.
OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider.
OnCollisionStay is called once per frame for every Collider or Rigidbody that touches another Collider or Rigidbody.
Minimum distance at which two cloth particles repel each other (default: 0.0).
Self-collision stiffness defines how strong the separating impulse should be for colliding particles.
OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.
OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.
OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider.
OnCollisionStay is called once per frame for every Collider or Rigidbody that touches another Collider or Rigidbody.
Sent when an incoming collider makes contact with this object's collider (2D physics only).
Sent when a collider on another object stops touching this object's collider (2D physics only).
Sent each frame where a collider on another object is touching this object's collider (2D physics only).
Sets the minimum separation distance for cloth inter-collision.
Sets the cloth inter-collision stiffness.
Determines whether the garbage collector should reuse only a single instance of a Collision type for all collision callbacks.
OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider.
Sent when an incoming collider makes contact with this object's collider (2D physics only).
OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider.
Sent when a collider on another object stops touching this object's collider (2D physics only).
OnCollisionStay is called once per frame for every Collider or Rigidbody that touches another Collider or Rigidbody.
Sent each frame where a collider on another object is touching this object's collider (2D physics only).
Whether or not MonoBehaviour collision messages will be sent by the physics system.
Determines whether the garbage collector should reuse only a single instance of a Collision2D type for all collision callbacks.
Whether to use 2D or 3D colliders for particle collisions.
Use 2D colliders to collide particles against.
Use 3D colliders to collide particles against.
Quality of world collisions. Medium and low quality are approximate and may leak particles.
The most accurate world collisions.
Fastest and most approximate world collisions.
Approximate world collisions.
The type of collisions to use for a given Particle System.
Should collision detection be enabled? (By default always enabled).
Get the collision layer mask that indicates which layer(s) the specified layer can collide with.
Set the collision layer mask that indicates which layer(s) the specified layer can collide with.
Pre bake collision meshes on player build.
Get list of particles to be used for self and inter collision.
This allows you to set the cloth indices used for self and inter collision.
Determines whether other rigidbodies or character controllers collide with this character controller (by default this is always...
Uses interpolated normals for sphere collisions instead of flat polygonal normals.
Get the particle collision events for a GameObject. Returns the number of events written to the array.
Should the PhysicsDebugWindow display the collision geometry.
Any collisions with a relative linear velocity below this threshold will be treated as inelastic so no bounce will occur.
Adds a Collision shape associated with this Particle System trigger.
Gets a collision shape associated with this Particle System trigger.
Sets a Collision shape associated with this Particle System trigger.
Removes a collision shape associated with this Particle System trigger.
Gets ground collision data for the wheel.
The character's collision skin width.
Should the one-way collision behaviour be used?
Indicates whether the collision response or reaction is enabled or disabled.
The maximum number of collision shapes that can be attached to this Particle System trigger.
Whether to use one-way collision behaviour or not.
The solverVelocityIterations affects how accurately articulation body joints and collision contacts are resolved during bounce.
A decision priority assigned to this Collider2D used when there is a conflicting decision on whether a contact between itself a...
Details about a specific point of contact involved in a 2D physics collision.
The incoming Collider2D involved in the collision with the otherCollider.
The other Collider2D involved in the collision with the collider.
The other Rigidbody2D involved in the collision with the rigidbody.
The incoming Rigidbody2D involved in the collision with the otherRigidbody.
Describes how far in the future the agents predict collisions for avoidance.
Indicates the number of collision shapes attached to this Particle System trigger.
The defaultSolverVelocityIterations affects how accurately the Rigidbody joints and collision contacts are resolved. (default 1...
Set whether the reporting of collisions callbacks immediately stops if any of the objects involved in the collision are deleted...
The solverVelocityIterations affects how how accurately Rigidbody joints and collision contacts are resolved. Overrides Physics...
Should kinematic/kinematic and kinematic/static collisions be allowed?
The solverIterations determines how accurately articulation body joints and collision contacts are resolved.
Does this group block raycasting (allow collision).
The maximum distance the capsule cast checks for collision.
Add one virtual particle per triangle to improve collision stability.
The Layers that this Collider2D will report collision or trigger callbacks for during a contact with another Collider2D.
The Layers that this Collider2D can receive forces from during a Collision contact with another Collider2D.
The Layers that this Collider2D is allowed to send forces to during a Collision contact with another Collider2D.
Brings violated constraints back into alignment even when the solver fails. Projection is not a physical process and does not p...
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 contacts with collision normal angles that are greater than this ...
The impulse applied to this contact pair to resolve the collision.
The impulse applied to this contact pair to resolve the collision.
Describes a contact point where the collision occurs.
The impulse applied to this contact pair to resolve the collision.
ControllerColliderHit is used by CharacterController.OnControllerColliderHit to give detailed information about the collision a...
The direction the CharacterController was moving in when the collision occured.
Set this to true to use the adjacentEndPoint to form the collision normal that is used to calculate the collision response when...
Set this to true to use the adjacentStartPoint to form the collision normal that is used to calculate the collision response wh...
Should the collider-mask be used or the global collision matrix?
A mesh collider allows you to do collision detection between meshes and primitives.
The mesh object used for collision detection.
Collect geometry from the 3D physics collision representation.
Trigger when particles enter the collision volume.
Trigger when particles leave the collision volume.
Trigger when particles are inside the collision volume.
Trigger when particles are outside the collision volume.
Subscribe to this event to be able to customize the collision response for contact pairs.
Subscribe to this event to be able to customize the collision response of CCD generated contact pairs.
The defaultSolverIterations determines how accurately Rigidbody joints and collision contacts are resolved. (default 6). Must b...
Set whether to continue or stop the proccesing of collision callbacks if any of the objects involved in the collision are deleted.
The angle of an arc that defines the sides of the platform centered on the local 'left' and 'right' of the effector. Any collis...
Budget for how many ray casts can be performed per frame for approximate collision testing.
The uv texture coordinate at the collision location.
The solverIterations determines how accurately Rigidbody joints and collision contacts are resolved. Overrides Physics.defaultS...
The thickness of the terrain used for collision detection.
A CharacterController allows you to easily do movement constrained by collisions without having to deal with a rigidbody.
Sets the contact filter to filter the results by the collision's normal angle using minNormalAngle and maxNormalAngle.
Subscribe to this event to read all collisions that occurred during the physics simulation step.
Applies platform behaviour such as one-way collisions etc.
The maximum distance the ray should check for collisions.
The maximum distance the sphere should check for collisions.
Supplies the movement of a GameObject with an attached CharacterController component.
Called when a Collider with the Collider.isTrigger property overlaps another Collider.
Sent when another object enters a trigger collider attached to this object (2D physics only).
Sets the Composite Collider 2D to generate closed outlines for the merged collider geometry consisting of only edges.
Sets the Composite Collider 2D to generate closed outlines for the merged collider geometry consisting of convex polygon shapes.
Defines the position of a virtual point adjacent to the end point of the EdgeCollider2D.
Defines the position of a virtual point adjacent to the start point of the EdgeCollider2D.
Allow the physics engine to increase the volume of the input mesh in attempt to generate a valid convex mesh.
OnParticleTrigger is called when any particles in a Particle System meet the conditions in the trigger module.
A threshold below which a contact is automatically disabled.
Casts a line segment against Colliders in the Scene.
The angle of an arc that defines the surface of the platform centered of the local 'up' of the effector.
Provides physics movement and other dynamics, and the ability to attach Collider2D to it.
Mass of the Rigidbody.
Moves the rigidbody to position.
Rotates the Rigidbody to angle (given in degrees).
The additional layers that all Colliders attached to this ArticulationBody should exclude when deciding if the Collider can com...
The additional layers that all Colliders attached to this ArticulationBody should include when deciding if a the Collider can c...
Controls the radius of all edges created by the collider.
Brings violated constraints back into alignment even when the solver fails.
Get list of indices to be used when generating virtual particles.
Get weights to be used when generating virtual particles for cloth.
Set indices to use when generating virtual particles.
Sets weights to be used when generating virtual particles for cloth.
Sets the stiffness frequency parameter.
Contact offset value of this collider.
The additional layers that this Collider should exclude when deciding if the Collider can contact another Collider.
The additional layers that this Collider should include when deciding if the Collider can contact another Collider.
Specify if this collider is configured as a trigger.
A decision priority assigned to this Collider used when there is a conflicting decision on whether a Collider can contact anoth...
Casts the Collider shape into the Scene starting at the Collider position ignoring the Collider itself.
The layers of other Collider2D involved in contacts with this Collider2D that will be captured.
Creates a planar Mesh that is identical to the area defined by the Collider2D geometry.
Calculates the minimum separation of this collider against another collider.
The additional Layers that this Collider2D should exclude when deciding if a contact with another Collider2D should happen or not.
Gets all the PhysicsShape2D used by the Collider2D.
The additional Layers that this Collider2D should include when deciding if a contact with another Collider2D should happen or not.
Check whether this collider is touching the collider or not.
Checks whether this collider is touching any colliders on the specified layerMask or not.
Casts a ray into the Scene that starts at the Collider position and ignores the Collider itself.
Whether the collider is used by an attached effector or not.
Controls the radius of all edges created by the Collider.
Total impulse sum of the pair.
Total impulse sum of the pair.
Normal of the contact point.
The effective bounciness used for the ContactPoint2D.
The effective friction used for the ContactPoint2D.
Controls the radius of all edges created by the collider.
The tag assigned to the GameObject.
Toggle cleaning of the mesh.
Toggle the removal of equal vertices.
Access the current velocity of the NavMeshAgent component, or set a velocity to control the agent manually.
Should this obstacle make a cut-out in the navmesh.
Flushes the delayed actions created by PaintContext heightmap and alphamap modifications.
Applies an edited heightmap PaintContext by copying modifications back to the source Terrain tiles.
Applies an edited Terrain holes PaintContext by copying modifications back to the source Terrain tiles.
Script interface for the SubEmittersModule of a Particle System.
Script interface for the TriggerModule of a Particle System.
Compute the minimal translation required to separate the given colliders apart at specified poses.
The default contact offset of the newly created colliders.
The maximum default velocity needed to move a Rigidbody's collider out of another collider's surface penetration. Must be posit...
Casts a ray, from point origin, in direction direction, of length maxDistance, against all colliders in the Scene.
Simulate physics in the Scene.
Casts a box against Colliders in the Scene, returning the first Collider to contact with it.
The default contact offset of the newly created Colliders.
Calculates the minimum distance between two Colliders.
Checks whether the passed Colliders are in contact or not.
Checks whether the Collider is touching any Colliders on the specified layerMask or not.
A set of options that control how physics operates when using the job system to multithread the physics simulation.
Casts a line against Colliders in the Scene.
Casts a ray against Colliders in the Scene.
Casts a ray against Colliders in the Scene, returning all Colliders that contact with it.
A set of options that control how physics operates when using the job system to multithread the physics simulation.
Asset type that defines the surface properties of a Collider2D.
Coefficient of restitution.
Coefficient of friction.
Describes how PhysicsMaterial2D friction and bounciness are combined when two Collider2D come into contact.
Casts a line segment against colliders in the PhysicsScene2D, returning the first intersection only.
Casts a ray against colliders in the PhysicsScene2D, returning the first intersection only.
Defines the position of a virtual point adjacent to the end vertex of an edge shape.
Defines the position of a virtual point adjacent to the start vertex of an edge shape.
Use multiple edges to interpret the PhysicsShape2D geometry.
Use a convex polygon shape to interpret the PhysicsShape2D geometry.
Ensures that all contacts controlled by the one-way behaviour act the same.
The distance from the ray's origin to the impact point.
The surface normal of the detected Collider2D.
The additional layers that all Colliders attached to this Rigidbody should exclude when deciding if the Collider can come into ...
The additional layers that all Colliders attached to this Rigidbody should include when deciding if the Collider can come into ...
All the Collider2D shapes attached to the Rigidbody2D are cast into the Scene starting at each Collider position ignoring the C...
Calculates the minimum distance of this collider against all Collider2D attached to this Rigidbody2D.
The additional Layers that all Collider2D attached to this Rigidbody2D should exclude when deciding if a contact with another C...
The additional Layers that all Collider2D attached to this Rigidbody2D should include when deciding if a contact with another C...
Checks whether the 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.
Slide the Rigidbody2D using the specified velocity integrated over deltaTime using the configuration specified by slideMovement.
A LayerMask that will be used when determining what Collider2D should be detected.
Whether the specified Rigidbody2D.SlideMovement.layerMask should be used or not when determining what Collider2D should be dete...
Internal name used to load the built Scene from an asset bundle.
Script interface for the SubEmittersModule.
Triggers an update to integrate modifications done to the heightmap outside of unity.
Helper function to complete a heightmap modification.
Helper function to complete a Terrain holes modification.
Script interface for the TriggerModule.
A special collider for vehicle wheels.
Contact information for the wheel, reported by WheelCollider.
Checks if an AssetBundle is cached.
OnTriggerExit is called when the Collider other has stopped touching the trigger.
OnTriggerStay is called almost all the frames for every Collider other that is touching the trigger. The function is on the phy...
Sent when another object leaves a trigger collider attached to this object (2D physics only).
Sent each frame where another object is within a trigger collider attached to this object (2D physics only).
Sets to filter contact results based on trigger collider involvement.
The normal of the surface we collided with in world space.
Add an instant force impulse to the rigidbody, using its mass.
Add an instant force impulse to the rigidbody2D, using its mass.
Represents a 128-bit hash value.
The force that needs to be applied for this joint to break.
The torque that needs to be applied for this joint to break. To be able to break, a joint must be _Locked_ or _Limited_ on the ...
OnParticleSystemStopped is called when all particles in the system have died, and no new particles will be born. New particles ...
OnParticleUpdateJobScheduled is called when a Particle System's built-in update job has been scheduled.
Sent when another object enters a trigger collider attached to this object (2D physics only).
OnTriggerExit is called when the Collider other has stopped touching the trigger.
Sent when another object leaves a trigger collider attached to this object (2D physics only).
OnTriggerStay is called once per physics update for every Collider other that is touching the trigger.
Sent once per physics update when another object is within a trigger collider attached to this object (2D physics only).
Find all colliders touching or inside of the given box.
Rebuild the broadphase interest regions as well as set the world boundaries.
The maximum number of vertices allowed per primitive polygon shape type (PhysicsShapeType2D.Polygon). (Read Only)
Checks if a Collider falls within a rectangular area.
Checks if a Collider falls within a box area.
Checks if a Collider falls within a capsule area.
Checks if a Collider falls within a circular area.
Checks if a Collider overlaps a point in space.
Casts a ray, from point origin, in direction direction, of length maxDistance, against all colliders in the Scene.
Whether the PhysicsDebugWindow visualizes all contacts.
Control of an object's position through physics simulation.
Controls whether physics affects the rigidbody.
The linear velocity of the Rigidbody2D represents the rate of change over time of the Rigidbody2D position in world-units.
Use this method to set the buffer of a given type for this Camera. This allows the VFX Manager to use the buffer.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.