-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
PRI 2Priority 2; ImportantPriority 2; Importantbig featureThis is a large feature of the engineThis is a large feature of the engine
Description
Integrate bullet physics with our entity component system.
https://github.com/bulletphysics/bullet3
Basic rough draft of the physic system
// Add a 3D rigidbody component
entt::entitty e = reg.create();
Rigidbody& c = reg.assign<Rigidbody>(e, transform, force, velocity, acceleration, mass, etc....);
// Add collision body component for collision detection
entt::entitty e = reg.create();
SphereCollider& c = reg.assign<SphereCollider>(e, transform, radius);
// Add
entt::entitty e = reg.create();
Transform& c = reg.assign<Transform>(e, Transform{});
Rigidbody& c = reg.assign<Rigidbody>(e, transform, force, velocity, acceleration, mass, etc....);
SphereCollider& c = reg.assign<SphereCollider>(e, transform, radius);
class PhysicSystem
{
// Update all active physics component
void Update(entt::registry reg);
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PRI 2Priority 2; ImportantPriority 2; Importantbig featureThis is a large feature of the engineThis is a large feature of the engine