build Constructors 1

data_object Properties 28

AngularDamping
float
AngularVelocity
Vector3
CollisionEventsEnabled
bool
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
bool
Like CollisionEventsEnabled but means the OnCollisionUpdate gets called when the collision persists
EnableImpactDamage
bool
Whether this rigidbody can deal damage to damageable objects on high-speed impacts.
EnhancedCcd
bool
Enable enhanced continuous collision detection (CCD) for this body. When enabled, the body performs CCD against dynamic bodies (but not against other bodies with enhanced CCD enabled). This is useful for fast-moving objects like bullets or rockets that need reliable collision detection.
Gravity
bool
Is gravity enabled or not.
GravityScale
float
Scale the gravity relative to Sandbox.PhysicsWorld.Gravity. 2 is double the gravity, etc.
ImpactDamage
float
The amount of damage this rigidbody deals to other objects when it collides at high speed. If set to 0 or less, this will be calculated from the mass of the rigidbody.
InertiaTensor
Vector3
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
Rotation
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
IReadOnlySet`1
A list of joints that we're connected to, if any.
LinearDamping
float
Locking
PhysicsLock
Mass
float
MassCenter
Vector3
Center of mass for this rigidbody in local space coordinates.
MassCenterOverride
Vector3
MassOverride
float
Override mass for this body, only when value is more than zero
MinImpactDamageSpeed
float
The minimum speed required for an impact to cause damage.
MotionEnabled
bool
OverrideMassCenter
bool
PhysicsBody
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
RigidbodyFlags
Sleeping
bool
SleepThreshold
float
The speed threshold below which this body will be put to sleep. Units per second. Increase this to make the body sleep sooner, which is useful for stacking stability.
StartAsleep
bool
Touching
IEnumerable`1
This is a list of all of the triggers that we are touching.
Velocity
Vector3

functions Methods 13

ApplyBuoyancy (plane, dt)
Applies buoyancy and drag to the rigidbody relative to a plane to simulate things floating in water.
ApplyForce (force)
Applies linear force to this body
ApplyForceAt (position, force)
Applies force to this body at given position.
ApplyImpulse (force)
Applies instant linear impulse (i.e. a bullet impact) to this body
ApplyImpulseAt (position, force)
Applies instant linear impulse (i.e. a bullet impact) to this body at given position
ApplyTorque (force)
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 (position)
Vector3
Returns the closest point to the given one between all convex shapes of this body.
GetVelocityAtPoint (position)
Vector3
Returns the world space velocity of a point of the object. This is useful for objects rotating around their own axis/origin.
GetWorldBounds ()
BBox
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 (transform, timeToArrive, timeDelta)
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 (rotation, timeToArrive, timeDelta)
Rotate the body to this position in a way that cooperates with the physics system.

functions Static Methods 1

Inheritance

people
Log in to reply
You can't reply if you're not logged in. That would be crazy.