So, the game I’m working is tile-based. (and 2D) I’m using a custom mesh/texture atlas to render the terrain. This means I have only a few spatial/geometries (one for each chunk of terrain). But for physics each solid tile needs a static body of it’s own for collision detection.
Will RigidBodyControl work without being attached to a spatial or do I need to do something different for this situation? I assume it needs to be attached to a spatial so it will have its update method called regularly. Could I just add all the controls to the single spatial?
Another relevant factor is the tiles can change from solid to non-solid, I was planning to enable/disable or add/remove the rigid body controls from the physics space based on the changes. What would everyone recommend for this situation?
Also I intend to let some tiles increase/decrease linear damping on objects depending on the tile and the particular object’s type (ex: human goes much slower through mud than grass, but a tank would not slow down in mud but be slow through dense forest). My plan for this was to use a ghost for each tile and change the linear damping of the bodies based on the one they were colliding with. but this solution would be very slow and I’m hoping someone can point me in the direction of a better way.