Hey guys. I'm trying to implement an ECS such that entities are simple arrays of IDs to components. To do this I need to move the physicality out of it. My question is, what is the structure of the physics components I need to use?
Here's my thought process:
Firstly, render components need access to physical positions, velocities (for motion blur), angles, and scale. Could we put all this in a separate component? Also, there's the fact that accessing information from a random component outside the rendering pipeline will slow things down due to data locality.
Secondly, not all objects need all three, scale, position, and angle. Should these be a separate component or is it not worth it?
Thirdly, physics engines and AABB collisions need access to the position, scale, and angle. Bullet has this inside their own classes. How should I deal with that? Should I update the position, angles, and scale every time I iterate the physics??
Finally, how do I implement containers for joints and other non-rigid-body stuff Should they simply be outside of the main ECS?
Thank you in advance!