Obtaining a certain type of object with component based design A lot of physic engines has a void* to user data or a function pointer to attach a callback. You can attach your entity to these elements and avoid the need to communicate between components.