Class BulletPhysicsSetup
Bullet as the physics engine of a SceneSetup: CreatePrimitive gives its entities a
RigidbodyComponent with the collider fitted to the shape, and the grounds a
StaticColliderComponent. Chosen with UseBullet<T>(T).
public sealed class BulletPhysicsSetup : PhysicsSetupBase
- Inheritance
-
BulletPhysicsSetup
- Inherited Members
Remarks
A Bullet3DPhysicsOptions or Bullet2DPhysicsOptions passed to CreatePrimitive is
read back here, so PhysicsComponent and Mass
mean what they mean on AddBulletPhysics(Entity, Primitive3D, Bullet3DPhysicsOptions?) and AddBulletPhysics(Entity, Primitive2D, Bullet2DPhysicsOptions?).
Methods
AddBody(Entity, Primitive2D, Primitive2DEntityOptions?)
Attaches a dynamic body with the collider that matches shape.
public override void AddBody(Entity entity, Primitive2D shape, Primitive2DEntityOptions? options)
Parameters
entityEntityThe entity with the shape's model.
shapePrimitive2DThe shape the model was built from.
optionsPrimitive2DEntityOptionsThe options the entity was created with; a package reads its own derived options back from them.
AddBody(Entity, Primitive3D, Primitive3DEntityOptions?)
Attaches a dynamic body with the collider that matches shape.
public override void AddBody(Entity entity, Primitive3D shape, Primitive3DEntityOptions? options)
Parameters
entityEntityThe entity with the shape's model.
shapePrimitive3DThe shape the model was built from.
optionsPrimitive3DEntityOptionsThe options the entity was created with; a package reads its own derived options back from them.
AddStatic(Entity, Primitive2D, Primitive2DEntityOptions?)
Attaches a static collider that matches shape: a ground, a wall.
public override void AddStatic(Entity entity, Primitive2D shape, Primitive2DEntityOptions? options)
Parameters
entityEntityThe entity with the shape's model.
shapePrimitive2DThe shape the model was built from.
optionsPrimitive2DEntityOptionsThe options the entity was created with; a package reads its own derived options back from them.
AddStatic(Entity, Primitive3D, Primitive3DEntityOptions?)
Attaches a static collider that matches shape: a ground, a wall.
public override void AddStatic(Entity entity, Primitive3D shape, Primitive3DEntityOptions? options)
Parameters
entityEntityThe entity with the shape's model.
shapePrimitive3DThe shape the model was built from.
optionsPrimitive3DEntityOptionsThe options the entity was created with; a package reads its own derived options back from them.