Simulate documentation

Rigid Bodies

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.1.2).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Rigid Bodies

class simulate.RigidBodyComponent

< >

( 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 to None) — The user-defined name of this material.
  • mass (float, optional, defaults to 1.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 to None) — Inertia tensor of the rigidbody.
  • linear_drag (float, optional, defaults to 0.0) — Linear drag of the rigidbody.
  • angular_drag (float, optional, defaults to 0.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 to True) — 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 to False) — 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.