Module rigid_body

Source
Expand description

Common components and bundles for rigid bodies.

Re-exports§

pub use forces::ExternalAngularImpulse;
pub use forces::ExternalForce;
pub use forces::ExternalImpulse;
pub use forces::ExternalTorque;

Modules§

forces
Forces, torques, linear impulses, and angular impulses that can be applied to dynamic rigid bodies.
mass_properties
Mass property functionality for rigid bodies and colliders.

Structs§

AccumulatedTranslation
Translation accumulated during the physics frame. Used primarily by solver internals.
AngularDamping
Automatically slows down a dynamic rigid body, decreasing its angular velocity each frame. This can be used to simulate air resistance.
AngularVelocity
The angular velocity of a rigid body, represented as a rotation axis multiplied by the angular speed in radians per second.
DefaultFriction
A resource for the default Friction to use for physics objects.
DefaultRestitution
A resource for the default Restitution to use for physics objects.
Dominance
Dominance allows dynamic rigid bodies to dominate each other during physical interactions.
Friction
A component for dry friction, controlling how strongly a rigid body or collider opposes sliding along other surfaces while in contact.
GravityScale
Controls how gravity affects a specific rigid body.
LinearDamping
Automatically slows down a dynamic rigid body, decreasing its linear velocity each frame. This can be used to simulate air resistance.
LinearVelocity
The linear velocity of a rigid body, typically in meters per second.
LockedAxes
A component that specifies which translational and rotational axes of a rigid body are locked.
MaxAngularSpeed
The maximum angular speed of a rigid body, clamping the AngularVelocity, in radians per second.
MaxLinearSpeed
The maximum linear speed of a rigid body, clamping the LinearVelocity, typically in meters per second.
Restitution
A component for restitution, controlling how bouncy a rigid body or collider is.
RigidBodyDisabled
A marker component that indicates that a rigid body is disabled and should not participate in the simulation. Disables velocity, forces, contact response, and attached joints.
RigidBodyQuery
A WorldQuery to make querying and modifying rigid bodies more convenient.
RigidBodyQueryItem
Automatically generated [WorldQuery](bevy :: ecs::query::WorldQuery) item type for RigidBodyQuery, returned when iterating over query results.
RigidBodyQueryReadOnly
Automatically generated [WorldQuery](bevy :: ecs::query::WorldQuery) type for a read-only variant of RigidBodyQuery.
RigidBodyQueryReadOnlyItem
Automatically generated [WorldQuery](bevy :: ecs::query::WorldQuery) item type for RigidBodyQueryReadOnly, returned when iterating over query results.
Sleeping
Indicates that a rigid body is not simulated by the physics engine until woken up again. This is done to improve performance and to help prevent small jitter that is typically present in collisions.
SleepingDisabled
Indicates that the body can not be deactivated by the physics engine. See Sleeping for information about sleeping.
TimeSleeping
How long the velocity of the body has been below the SleepingThreshold, i.e. how long the body has been able to sleep.

Enums§

CoefficientCombine
Determines how coefficients are combined for Restitution and Friction. The default is Average.
RigidBody
A non-deformable body used for the simulation of most physics objects.