Sim-eth-es physics


#1

Why Body is not implemented as a component (well, entity with a component) and encapsulates integrate() method? I kinda expected it to be in SimplePhysics.


#2

Body is specific to the physics engine and has nothing to do with the entity system.

Moreover… you would never ever ever ever ever ever ever put an integrate() method on a component. Components are data only. And integrate() sounds a whole lot like “doing something”.


#3

Yep, I mean why it is not a component and integrate() is not in SimplePhysics? Since it is a system, it could do integration for all entities with Body component…


#4

The Body is used to keep track of the physics related stuff from from to frame. There is no point to making it a component. The physics system already has the components that it needs.