Class BulletPhysicsOptions
The options of a primitive entity with Bullet physics, 2D or 3D: the entity options plus the physics component and the mass.
public class BulletPhysicsOptions : PrimitiveEntityOptions
- Inheritance
-
BulletPhysicsOptions
- Inherited Members
Remarks
With PhysicsComponent left null, Body decides what is attached: a RigidbodyComponent, the same body kinematic, or a StaticColliderComponent; None attaches nothing. The component gets the collider shape that fits the primitive, and a 2D shape's hull is as deep as the shape says.
A supplied PhysicsComponent wins over the mode and is used as it is. One that already holds a collider shape keeps it: the fitted shape is added to an empty component only. A supplied component with None is refused, since the two contradict each other.
Options without a component can serve any number of entities, each getting a fresh component. Options with a supplied component serve one entity: a component belongs to one entity, and the engine refuses it on a second.
Properties
Mass
Gets or sets the mass of the rigid body, in kilograms, or null for Bullet's default of 1.
public float? Mass { get; set; }
Property Value
Remarks
Bullet keeps mass on the rigid body. A static collider has no mass; a value given with Static is ignored with a line in the log.
PhysicsComponent
Gets or sets the Bullet physics component attached to the entity, or null to have one made from Body.
public PhysicsComponent? PhysicsComponent { get; set; }