I'm not a big fan of the Factory / Def pattern in Box2d - it makes extending the core classes impossible without patching the source, so thank you for avoiding that. It would be nice to have some mechanism in place to automatically have controllers' step functions called each step... although in my framework this is trivial so I don't need it personally. The order could be defined by assigning each controller a priority (like event listeners).
I think a nice feature to have in a base controller class would be the ability to hook it up to a sensor (or more than one sensors). I can see this being the primary way controllers are used, and would be nice to have in the base class so every controller doesn't have to implement it's own bind-to-sensor functionality. This would also allow the use of mask & category bits (on the sensor) to filter out what the controller controls.
Would also be cool if the direction of the force / acceleration applied by the controller could be rotated by the rotation of the sensor involved in the contact, but that would probably be up to the implementation of each controller.
Contrary to this, it would also be nice to be able to tell a controller to effect all bodies in the world (since I'm going to be using them to implement gravity).
Just some thoughts.
I think a nice feature to have in a base controller class would be the ability to hook it up to a sensor (or more than one sensors). I can see this being the primary way controllers are used, and would be nice to have in the base class so every controller doesn't have to implement it's own bind-to-sensor functionality. This would also allow the use of mask & category bits (on the sensor) to filter out what the controller controls.
Would also be cool if the direction of the force / acceleration applied by the controller could be rotated by the rotation of the sensor involved in the contact, but that would probably be up to the implementation of each controller.
Contrary to this, it would also be nice to be able to tell a controller to effect all bodies in the world (since I'm going to be using them to implement gravity).
Just some thoughts.