Rigidbody
class in UnityEngine · UnityEngine.PhysicsModule · inherits from Component
A PhysX dynamic body (see tassix_physics). Settings push to the native body immediately; position, rotation and velocities read the simulation. Defaults are Unity 6's (recorded in physics_basic).
Properties 28
float angularDamping { get; set; }float angularDrag { get; set; }Unity's pre-6 name for angularDamping.
Vector3 angularVelocity { get; set; }Vector3 centerOfMass { get; set; }CollisionDetectionMode collisionDetectionMode { get; set; }RigidbodyConstraints constraints { get; set; }bool detectCollisions { get; set; }float drag { get; set; }Unity's pre-6 name for linearDamping.
LayerMask excludeLayers { get; set; }Layers none of this body's colliders contact.
bool freezeRotation { get; set; }LayerMask includeLayers { get; set; }Layers all this body's colliders also contact.
Vector3 inertiaTensor { get; set; }The inertia tensor (its diagonal) and its rotation: kept as set; the physics engine works the body's inertia out from its colliders.
Quaternion inertiaTensorRotation { get; set; }RigidbodyInterpolation interpolation { get; set; }Stored; rendering interpolation arrives with the render-side transform smoothing.
bool isKinematic { get; set; }float linearDamping { get; set; }Vector3 linearVelocity { get; set; }float mass { get; set; }float maxAngularVelocity { get; set; }float maxLinearVelocity { get; set; }Vector3 position { get; set; }The body's position in the simulation (the transform follows after the next step).
Quaternion rotation { get; set; }float sleepThreshold { get; set; }int solverIterations { get; set; }int solverVelocityIterations { get; set; }bool useGravity { get; set; }Vector3 velocity { get; set; }Unity's pre-6 name for linearVelocity.
Vector3 worldCenterOfMass { get; }Methods 19
void AddExplosionForce(float explosionForce, Vector3 explosionPosition, float explosionRadius, float upwardsModifier = 0f, ForceMode mode = ForceMode.Force)void AddExplosionForce(float explosionForce, Vector3 explosionPosition, float explosionRadius, float upwardsModifier)void AddExplosionForce(float explosionForce, Vector3 explosionPosition, float explosionRadius)Unity's explosion: a force away from the center, falling off linearly with distance.
void AddForce(Vector3 force, ForceMode mode = ForceMode.Force)void AddForce(Vector3 force)void AddForce(float x, float y, float z, ForceMode mode = ForceMode.Force)void AddForce(float x, float y, float z)void AddForceAtPosition(Vector3 force, Vector3 position, ForceMode mode = ForceMode.Force)void AddForceAtPosition(Vector3 force, Vector3 position)void AddRelativeForce(Vector3 force, ForceMode mode = ForceMode.Force)void AddRelativeForce(Vector3 force)void AddRelativeForce(float x, float y, float z, ForceMode mode = ForceMode.Force)void AddRelativeForce(float x, float y, float z)void AddRelativeTorque(Vector3 torque, ForceMode mode = ForceMode.Force)void AddRelativeTorque(Vector3 torque)void AddRelativeTorque(float x, float y, float z, ForceMode mode = ForceMode.Force)void AddRelativeTorque(float x, float y, float z)void AddTorque(Vector3 torque, ForceMode mode = ForceMode.Force)void AddTorque(Vector3 torque)void AddTorque(float x, float y, float z, ForceMode mode = ForceMode.Force)void AddTorque(float x, float y, float z)Vector3 ClosestPointOnBounds(Vector3 position)The point on the bounds of the body's colliders closest to position.
bool IsSleeping()void Move(Vector3 position, Quaternion rotation)void MovePosition(Vector3 position)void MoveRotation(Quaternion rot)void ResetCenterOfMass()void ResetInertiaTensor()void Sleep()bool SweepTest(Vector3 direction, out RaycastHit hitInfo, float maxDistance = float.PositiveInfinity, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)bool SweepTest(Vector3 direction, out RaycastHit hitInfo, float maxDistance)bool SweepTest(Vector3 direction, out RaycastHit hitInfo)Whether moving the body's colliders along direction would hit something (not its own colliders).
RaycastHit[] SweepTestAll(Vector3 direction, float maxDistance = float.PositiveInfinity, QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal)RaycastHit[] SweepTestAll(Vector3 direction, float maxDistance)RaycastHit[] SweepTestAll(Vector3 direction)void WakeUp()Not in Tassix yet 8
GetAccumulatedForce GetAccumulatedTorque PublishTransform automaticCenterOfMass automaticInertiaTensor inertiaTensor inertiaTensorRotation maxDepenetrationVelocity
Checked against Unity
Conformance scenarios that exercise it, recorded in Unity and compared event by event.