# Physics Simulation Forum

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Collisions dont match[OGRE+BULLET+OGREBULLET]Posted: Wed Aug 03, 2011 2:58 pm

Joined: Wed Aug 03, 2011 2:53 pm
Posts: 3
Hi ,
I use Ogre + Bullet + OgreBullet for my application.
it works so far, but the Ogre Object and the collision don't match. Any Ideas?
Scene create:
Code:

Ogre::AxisAlignedBox boundingB = Player.Entity->getBoundingBox();
size = boundingB.getSize();
size *= (Player.node->getScale()); // only the half needed
size /= 2;
size *= 0.96f;   // Bullet margin is a bit bigger so we need a smaller size
// after that create the Bullet shape with the calculated size
OgreBulletCollisions::BoxCollisionShape *sceneBoxShape = new OgreBulletCollisions::BoxCollisionShape(size);
Player.Body = new OgreBulletDynamics::RigidBody("PlayerPhys" ,mWorld);
Player.Body->setShape(   Player.node,sceneBoxShape,
0.0f,         // dynamic body restitution
0.0f,0.1f,         // dynamic body friction
Ogre::Vector3(0,0,0),      // starting position of the box
Ogre::Quaternion(1,0,0,0));// orientation of the box
Player.Body->setPosition(0,900,0);
Player.Body->setKinematicObject(true);
Player.Body->showDebugShape(true);

boundingB = Floor.Entity->getBoundingBox();
size = boundingB.getSize();
size *= (Floor.node->getScale());
size /=2;// only the half needed
size *= 0.96f;   // Bullet margin is a bit bigger so we need a smaller size
// after that create the Bullet shape with the calculated size
Floor.Shape = new OgreBulletCollisions::BoxCollisionShape(size);
Floor.Body = new OgreBulletDynamics::RigidBody("FloorPhys" ,mWorld);
Floor.Body->setStaticShape(Floor.Shape,0.1f,0.0f,Ogre::Vector3(0,0,0));

Top

 Post subject: Re: Collisions dont match[OGRE+BULLET+OGREBULLET]Posted: Fri Aug 05, 2011 10:06 am

Joined: Wed Aug 03, 2011 2:53 pm
Posts: 3
no idea?

Top

 Post subject: Re: Collisions dont match[OGRE+BULLET+OGREBULLET]Posted: Fri Aug 05, 2011 3:10 pm

Joined: Tue Jul 19, 2011 4:08 pm
Posts: 15
Just give it time, these forums are pretty slow moving. We're pretty much all hobbyists on the forums, I think. As to your question, I don't quite know, sorry. I'm not very experienced personally.

I did run into a possibly similar problem when I used a model that I didn't make as a test. The collision box was not matched to the mesh correctly. (the box was the right size, but centered around the bottom of the mesh) when I used a model I made myself, the box lined up right. I suspect that the box was created around the editable location known as the "center" of the model (center of mass?), but I could be barking up the wrong tree entirely. I know when I made my own test model, I didn't change that center, and built the model about the origin (I used blender), anyways.

Also, keep in mind that I used a different toolchain, irrlicht+irrBullet. Your milage may vary, some conditions apply.

Seriously though, I hope this helps.

Also, if this doesn't help, try posting your question in the feedback forum. It seems that is the most active forum for support.

Top

 Post subject: Re: Collisions dont match[OGRE+BULLET+OGREBULLET]Posted: Fri Aug 05, 2011 5:37 pm

Joined: Wed Aug 03, 2011 2:53 pm
Posts: 3
Thx for reaply,
but it doesnt help

the shapes have the wrong figure,too...

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

#### Who is online

Users browsing this forum: No registered users and 3 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities