Documentation

Unity Engine

Download Unity

Unity Engine

UnityEngine.PhysicsModule

The Physics module implements 3D physics in Unity.
Read time 5 minutesLast updated 3 hours ago

Definition

  • Type: Module

Classes

Class

Description

ArticulationBodyA body that forms part of a Physics articulation.
BoxColliderA box-shaped primitive collider.
CapsuleColliderA capsule-shaped primitive collider.
CharacterControllerA CharacterController allows you to easily do movement constrained by collisions without having to deal with a rigidbody.
CharacterJointCharacter Joints are mainly used for Ragdoll effects.
ColliderA base class of all colliders.
CollisionDescribes a collision.
ConfigurableJointThe configurable joint is an extremely flexible joint giving you complete control over rotation and linear motion.
ConstantForceA force applied constantly.
ControllerColliderHitControllerColliderHit is used by CharacterController.OnControllerColliderHit to give detailed information about the collision and how to deal with it.
FixedJointThe Fixed joint groups together 2 rigidbodies, making them stick together in their bound position.
HingeJointThe HingeJoint groups together 2 rigid bodies, constraining them to move like connected by a hinge.
ImmediatePhysicsThis class contains methods to run the immediate simulation steps.
JointJoint is the base class for all joints.
MeshColliderA Collider that takes a Mesh asset and builds its collision shape based on it.
PhysicsGlobal physics properties and helper methods.
PhysicsMaterialPhysics material describes how to handle colliding objects (friction, bounciness).
PhysicsSceneExtensionsScene extensions to access the underlying physics scene.
RigidbodyControl of an object's position through physics simulation.
SphereColliderA sphere-shaped primitive collider.
SpringJointThe spring joint ties together 2 rigid bodies, spring forces will be automatically applied to keep the object at the given distance.

Structs

Struct

Description

ArticulationDriveDrive applies forces and torques to the connected bodies.
ArticulationJacobianThe floating point dense Jacobian matrix of the articulation body hierarchy.
ArticulationReducedSpaceCoordinates in reduced space.
BoxcastCommandUse this struct to set up a box cast command to be performed asynchronously during a job.
BoxGeometryContains the basic geometric shape of a box.
CapsulecastCommandUse this struct to set up a capsule cast command that is performed asynchronously during a job.
CapsuleGeometryContains the basic geometric shape of a capsule.
ClosestPointCommandStruct used to set up a closest point command to be performed asynchronously during a job.
ColliderHitStruct used to retrieve information from an Overlap batch query.
ContactPairA pair of Colliders that belong to the bodies in the parent ContactPairHeader struct.
ContactPairHeaderA header struct which contains colliding bodies.
ContactPairPointA readonly struct describing a contact point between two Colliders.
ContactPointDescribes a contact point where the collision occurs.
ConvexMeshGeometryContains the basic geometric shape of a convex mesh.
GeometryHolderHolds the basic information of a geometric shape and its type.
ImmediateContactDescribes a contact where two shapes collide.
ImmediateTransformA transform, containing a position and rotation.
JointDriveHow the joint's movement will behave along its local X axis.
JointLimitsJointLimits is used by the HingeJoint to limit the joints angle.
JointMotorThe JointMotor is used to motorize a joint.
JointSpringJointSpring is used add a spring force to HingeJoint and PhysicsMaterial.
ModifiableContactPairA light-weight proxy that allows to access the contact buffers directly.
ModifiableMassPropertiesMass-related modifiable properties of a contact pair.
OverlapBoxCommandStruct used to set up an overlap box command to be performed asynchronously during a job.
OverlapCapsuleCommandStruct used to set up an overlap capsule command to be performed asynchronously during a job.
OverlapSphereCommandStruct used to setup an overlap sphere command to be performed asynchronously during a job.
PhysicsSceneRepresents a single instance of a 3D physics Scene.
PhysicsSceneLoadScopeScope used during scene load operations such as SceneManager.LoadSceneAsync, with the purpose of providing a different physics scene than the global one.
QueryParametersCreates a struct to set up parameters for batch queries: RaycastCommand, BoxcastCommand, CapsulecastCommand, SpherecastCommand.
RaycastCommandStruct used to set up a raycast command to be performed asynchronously during a job.
RaycastHitStructure used to get information back from a raycast.
SoftJointLimitThe limits defined by the CharacterJoint.
SoftJointLimitSpringThe configuration of the spring attached to the joint's limits: linear and angular. Used by CharacterJoint and ConfigurableJoint.
SpherecastCommandUse this struct to set up a sphere cast command that is performed asynchronously during a job.
SphereGeometryContains the basic geometric shape of a sphere.
TerrainGeometryContains the geometric shape of a Terrain collider.
TriangleMeshGeometryContains the basic geometric shape of a non-convex mesh (sometimes known as a triangle mesh).
WheelFrictionCurveWheelFrictionCurve is used by the WheelCollider to describe friction properties of the wheel tire.

Enums

Enum

Description

ArticulationDofLockThe lock type applied to a particular degree of freedom of an articulation body.
ArticulationDriveAxisAn axis of a drive of an ArticulationBody.
ArticulationDriveTypeThe drive type applied to a particular drive of an ArticulationBody.
ArticulationJointTypeThe type of the joint that restricts movement of the two connected articulation bodies.
CollisionDetectionModeThe collision detection mode constants used for Rigidbody.collisionDetectionMode.
CollisionFlagsCollisionFlags is a bitmask returned by CharacterController.Move.
ConfigurableJointMotionConstrains movement for a ConfigurableJoint along the 6 axes.
ForceModeUse ForceMode to specify how to apply a force using Rigidbody.AddForce or ArticulationBody.AddForce.
GeometryTypeThe set of basic geometry shape types that can exist.
JointProjectionModeDetermines how to snap physics joints back to its constrained position when it drifts off too much.
MeshColliderCookingOptionsCooking options that are available with MeshCollider.
PhysicsMaterialCombineDescribes how physics materials of the colliding objects are combined.
QueryTriggerInteractionOverrides the global Physics.queriesHitTriggers.
RigidbodyConstraintsUse these flags to constrain motion of Rigidbodies.
RigidbodyInterpolationRigidbody interpolation mode.
RotationDriveModeControl ConfigurableJoint's rotation with either X & YZ or Slerp Drive.
SimulationModeA selection of modes that control when Unity executes the physics simulation.
SimulationOptionAn enumerator that specifies physics simulation options.
SimulationStageA flag enum to determine which simulation stages to run.

Interfaces

Interface

Description

IGeometryAll basic geometric shapes implement this interface.