Original Post
I posted this on GDSE as well, but it might be "too discussiony" for that site...
I'm making a game engine, but I would like to have the physics part handled by professionally built physics engines, because I couldn't do it my self. My engine supports Scene handling, Cameras, and has a Renderer. Also, it has a class called Drawable, which has the positions and the picture of an object. The picture property has width, height, rotation and a draw method. All game objects are supposed to inherit from this Drawable class, and are added to the Scene, along with a Map (collection of Tiles, that also inherit from Drawable), lights, and so on and so forth.
I am considering adding a shape property (user-defined polygon) to the Drawable class as well, which would be used for shadows and such.
I am asking this question with a premise that most physics engines work in a similar way, and impose similar limitations. Is there anything I can do to make my engine more compatible wuth those physics engines?
Edit: what exactly do physics engines need to control? For example, if a physics engine supported a way of creating objects with position and shape(bounding box?) properties, that would be in obvious collision with my model, where Drawables had their pos and shape properties.
I'm making a game engine, but I would like to have the physics part handled by professionally built physics engines, because I couldn't do it my self. My engine supports Scene handling, Cameras, and has a Renderer. Also, it has a class called Drawable, which has the positions and the picture of an object. The picture property has width, height, rotation and a draw method. All game objects are supposed to inherit from this Drawable class, and are added to the Scene, along with a Map (collection of Tiles, that also inherit from Drawable), lights, and so on and so forth.
I am considering adding a shape property (user-defined polygon) to the Drawable class as well, which would be used for shadows and such.
I am asking this question with a premise that most physics engines work in a similar way, and impose similar limitations. Is there anything I can do to make my engine more compatible wuth those physics engines?
Edit: what exactly do physics engines need to control? For example, if a physics engine supported a way of creating objects with position and shape(bounding box?) properties, that would be in obvious collision with my model, where Drawables had their pos and shape properties.