0x46B
28-11-2010 14:49:28
Hello everyone,
I´ve tried the demo described in the Tutorial 2 here: http://www.ogre3d.org/tikiwiki/OgreBullet+Tutorial+2&structure=Libraries
My problem is, that the CollisionBox seems to get an offset somewhere, so it don´t match my mesh anymore.
The only thing I´ve changed is the mesh and the size, because my mesh is too small, but that seems not to affect anything, because in "originalscaling" the problem was there, too.
to
I´ve tried it with the defaultninja, too, but the behaviour is the same.
Here are the screens so you can see, what I am talking about:
http://img602.imageshack.us/i/bbox.png/
http://img232.imageshack.us/i/bbox2.png/
I´ve tried to change this line,
to something like this
too, but that seems to only affect where the box and the mesh is starting, not the offset between them.
I don´t know exactly where the problem is, so my searches around the net don´t were very sucessful. I would be happy about any clue, how to fix this.
Thanks in advance,
0x46B
I´ve tried the demo described in the Tutorial 2 here: http://www.ogre3d.org/tikiwiki/OgreBullet+Tutorial+2&structure=Libraries
My problem is, that the CollisionBox seems to get an offset somewhere, so it don´t match my mesh anymore.
The only thing I´ve changed is the mesh and the size, because my mesh is too small, but that seems not to affect anything, because in "originalscaling" the problem was there, too.
node->scale(0.05f, 0.05f, 0.05f); // the cube is too big for us
size *= 0.05f; // don't forget to scale down the Bullet-box too
to
node->scale(0.5f, 0.5f, 0.5f); // the cube is too big for us
size *= 0.5f; // don't forget to scale down the Bullet-box too
I´ve tried it with the defaultninja, too, but the behaviour is the same.
Here are the screens so you can see, what I am talking about:
http://img602.imageshack.us/i/bbox.png/
http://img232.imageshack.us/i/bbox2.png/
I´ve tried to change this line,
defaultBody->setShape(node,
sceneBoxShape,
0.6f, // dynamic body restitution
0.6f, // dynamic body friction
1.0f, // dynamic bodymass
position, // starting position of the box
Quaternion(0,0,0,1));// orientation of the box
to something like this
defaultBody->setShape(node,
sceneBoxShape,
0.6f, // dynamic body restitution
0.6f, // dynamic body friction
1.0f, // dynamic bodymass
position-Ogre::Vector3(xOffset,yOffset,zOffset), // starting position of the box
Quaternion(0,0,0,1));// orientation of the box
too, but that seems to only affect where the box and the mesh is starting, not the offset between them.
I don´t know exactly where the problem is, so my searches around the net don´t were very sucessful. I would be happy about any clue, how to fix this.
Thanks in advance,
0x46B