Adds physics properties to an object. Requires a collider to be attached to the same object.
AngularDamping |
|
AngularVelocity |
|
CollisionEventsEnabled |
Enable or disable touch events. If you disable the events then ICollisionListener won't get any touch events
and you won't get things like collision sounds. |
CollisionUpdateEventsEnabled |
Like CollisionEventsEnabled but means the OnCollisionUpdate gets called when the collision persists |
Gravity |
Is gravity enabled or not. |
InertiaTensor |
Gets or sets the inertia tensor for this body.
By default, the inertia tensor is automatically calculated from the shapes attached to the body.
Setting this property overrides the automatically calculated inertia tensor until Sandbox.Rigidbody.ResetInertiaTensor is called. |
InertiaTensorRotation |
Gets or sets the rotation applied to the inertia tensor.
Like Sandbox.Rigidbody.InertiaTensor, this acts as an override to the automatically calculated inertia tensor rotation
and remains in effect until Sandbox.Rigidbody.ResetInertiaTensor is called. |
Joints |
A list of joints that we're connected to, if any. |
LinearDamping |
|
Locking |
|
Mass |
|
MassCenter |
Center of mass for this rigidbody in local space coordinates. |
MassCenterOverride |
|
MassOverride |
Override mass for this body, only when value is more than zero |
MotionEnabled |
|
OverrideMassCenter |
|
PhysicsBody |
Get the actual physics body that was created by this component. You should be careful, this
can of course be null when the object is not enabled or the physics world is not available.
It might also get deleted and re-created, so best use this to access, but don't store it. |
RigidbodyFlags |
|
Sleeping |
|
StartAsleep |
|
Touching |
This is a list of all of the triggers that we are touching. |
Velocity |
|
ApplyForce |
Applies linear force to this body |
ApplyForceAt |
Applies force to this body at given position. |
ApplyImpulse |
Applies instant linear impulse (i.e. a bullet impact) to this body |
ApplyImpulseAt |
Applies instant linear impulse (i.e. a bullet impact) to this body at given position |
ApplyTorque |
Applies angular velocity to this body. |
ClearForces |
Clear accumulated linear forces (Sandbox.Rigidbody.ApplyForce(Vector3@) and Sandbox.Rigidbody.ApplyForceAt(Vector3@,Vector3@)) during this physics frame that were not yet applied to the physics body. |
FindClosestPoint |
Returns the closest point to the given one between all convex shapes of this body. |
GetVelocityAtPoint |
Returns the world space velocity of a point of the object. This is useful for objects rotating around their own axis/origin. |
GetWorldBounds |
Get the world bounds of this object |
ResetInertiaTensor |
Resets the inertia tensor and its rotation to the values automatically calculated from the attached colliders.
This removes any custom overrides set via Sandbox.Rigidbody.InertiaTensor or Sandbox.Rigidbody.InertiaTensorRotation. |
SmoothMove |
Move body to this position in a way that cooperates with the physics system. This is quite
good for things like grabbing and moving objects. |
SmoothRotate |
Rotate the body to this position in a way that cooperates with the physics system. |