Integrating Bullet into an Entity-Component architecture

Post Reply
willcassella
Posts: 9
Joined: Sun Dec 01, 2013 6:53 am

Integrating Bullet into an Entity-Component architecture

Post by willcassella »

I'm currently trying to integrate Bullet into my game (which uses the Entity-Component architecture, very similar to Unity's), and I'm a bit stuck on the best way to proceed. Should the Entity's get btCollisionObjects, or should the Components? How do I deal with parent-child relationships between Entities that have rigid bodies and/or colliders? Can you add multiple colliders to a single btRigidBody?

So far I have the idea that I want to add the following component types:
- XColliderComponent (where 'X' is Box/Capsule/Sphere, etc)
- RigidBodyComponent
- SoftBodyComponent (really not sure the best way to go about this, seems like it would have rendering implications as well)
- ConstraintComponent
- ForceComponent (is there a different way of doing forces that may work better?)

Beyond that, I'm pretty confused on what the best choices are here for general engine design, as well as how these questions relate specifically to Bullet, so any advice is appreciated.
Post Reply