Simulate documentation
Rigid Bodies
Rigid Bodies
class simulate.RigidBodyComponent
< source >( name: typing.Optional[str] = None mass: typing.Optional[float] = None center_of_mass: typing.Optional[typing.List[float]] = None inertia_tensor: typing.Optional[typing.List[float]] = None linear_drag: typing.Optional[float] = None angular_drag: typing.Optional[float] = None constraints: typing.Optional[typing.List[str]] = None use_gravity: typing.Optional[bool] = None collision_detection: typing.Optional[str] = None kinematic: typing.Optional[bool] = None )
Parameters
-
name (
string, optional, defaults toNone) — The user-defined name of this material. -
mass (
float, optional, defaults to1.0) — Mass of the rigidbody. -
center_of_mass (
List[float], optional, defaults to[0.0, 0.0, 0.0]) — Center of mass of the rigidbody. -
inertia_tensor (
List[float], optional, defaults toNone) — Inertia tensor of the rigidbody. -
linear_drag (
float, optional, defaults to0.0) — Linear drag of the rigidbody. -
angular_drag (
float, optional, defaults to0.0) — Angular drag of the rigidbody. -
constraints (List[str], optional, defaults to
[]) — List of constraints to apply to the rigidbody, selected in: [ “freeze_position_x”, “freeze_position_y”, “freeze_position_z”, “freeze_rotation_x”, “freeze_rotation_y”, “freeze_rotation_z”, ] -
use_gravity (
bool, optional, defaults toTrue) — Whether the rigidbody should ignore gravity. -
collision_detection (
str, optional, defaults to"discrete") — Whether to use discrete or continuous collision detection, for slower but more precise collision detection (recommended for small but fast-moving objects). -
kinematic (
bool, optional, defaults toFalse) — Set to True to ignore force collisions and treat the rigidbody as a fix/static object. Equivalent to isKinematic in Unity, custom_integrator in Godot and a mass = 0 in Bullet.
A rigid body characteristics that can be added to a primitive.