RigidBodyBundle struct
Component which encapsulates the creation all physics components required for a rigid body. A rigid body has all physical properties.
Adds:
- ColliderBundle
- Velocity
- AngularVelocity
- Force
- Torque
- Impulse
- AngularImpulse
- Mass
- Inertia
- CenterOfMass
- AccumulatedCorrection
- PhysicsMaterial
Public variables
- bool isActive
- Whether the collider is active.
- uint32_t layers
- Layers of the collider.
- uint32_t mask
- Mask of layers which the collider can collide with.
- float mass
- Mass of the rigid body.
- glm::vec3 velocity
- Initial velocity of the rigid body.
- glm::vec3 angularVelocity
- Initial angular velocity of the rigid body.
- glm::vec3 force
- Inital force applied on the rigid body.
- glm::vec3 torque
- Initial torque applied on the rigid body.
- glm::vec3 impulse
- Initial impulse applied on the rigid body.
- glm::vec3 angularImpulse
- Initial angular impulse applied on the rigid body.
- PhysicsMaterial material
- Physics material of the rigid body.
- glm::vec3 centerOfMass
- The center of mass of the rigid body.
- bool autoInertiaTensor
- Whether to perform automatic calculation of the inertia tensor according to the rigid body collision shape.
- glm::mat3 inertiaTensor
- Inertia tensor for the rigid body. Not used if 'autoInertiaTensor' is set to true.