Jump to content
  • Advertisement
Sign in to follow this  
Scobbo

[SOLVED] Using Bullet with Ogre

This topic is 2569 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone,
This is a bit of a n00b question, but I am currently learing to use Ogre in C++ I plan to use Bullet Physics for the physics engine, my question is how do I use them together. Do I load a model into the program with Ogre then set it's attributes with Bullet? I was looking at some videos of Havok when researching which one I would use and it showed that it was moving the legs depending on the angle of the ground. Being a novice, I can't see how the two will work together if they are both trying to modify the position, orientation and animation of the model.

Thanks guys and gals for helping me!

-Scobbo

Share this post


Link to post
Share on other sites
Advertisement

Being a novice, I can't see how the two will work together if they are both trying to modify the position, orientation and animation of the model.

You need to incoperate some kind of logic to let them play together. You could use the MVC (model view controller) Pattern to handle it. This is, you write some kind of entity class or structure which represents your model (i.e. it contains game logic related attributes like health and orientation, position etc.), you define a view, which renders it (=>OGRE) and you define some kind of contoller, which is a combination of a phyiscs engine (=>bullet) and keyboard input(=>applies forces to entity) to move your entity around.

This way you need to hold some data redundant, but on the other hand it has a very clear and managable structure.

Share this post


Link to post
Share on other sites

[quote name='Scobbo' timestamp='1323066855' post='4890625']
Being a novice, I can't see how the two will work together if they are both trying to modify the position, orientation and animation of the model.

You need to incoperate some kind of logic to let them play together. You could use the MVC (model view controller) Pattern to handle it. This is, you write some kind of entity class or structure which represents your model (i.e. it contains game logic related attributes like health and orientation, position etc.), you define a view, which renders it (=>OGRE) and you define some kind of contoller, which is a combination of a phyiscs engine (=>bullet) and keyboard input(=>applies forces to entity) to move your entity around.

This way you need to hold some data redundant, but on the other hand it has a very clear and managable structure.
[/quote]

Ah I see now, so there will be some redundant data and some functions of Ogre will not be used because they will be superseded by some functions in Bullet. So the mesh is loaded and rendered by Ogre but the animation and ragdoll and individual limb movements are handled by Bullet. I'm researching the MVC pattern now. Thanks so much for your help!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!