nord666
21-07-2008 21:47:59
Hello, i just passed from Newton to Bullet. It look like better but more complex to use. So, the questions :

What does bodyRestitution in OgreBulletDynamics::RigidBody::setShape() function?

Does the mass in Kg, g or any other unity?

Same question but for distance(km, miles, m,...)
Thanks for your answers! (And sorry for my english

)
subquantum
22-07-2008 14:37:01
Hi. I just finished successfully porting my engine from OgreNewt to pure Bullet, so I can probably help. You're correct in your observation about power vs complexity
Usually physics engines work in the standard units: meter, kg, second. But, you can probably change the weight and length units, as long as you're consistent.
I would recommend looking at the bullet documentation (
http://www.bulletphysics.com/Bullet/wordpress/download) for specific information like what bodyRestitution does. I believe it has to do with at what speed threshold bodies will fall asleep.
As for differences between Newton and Bullet...
The newton world is replaced almost exactly with the bullet DynamicsWorld. There are a few extra steps in setting up a bullet world, such as choosing the algorithms, but these are mostly just for tweaking, and are explained well in the bullet demos.
Newton rigid bodies and geometries map almost exactly to bullet RigidBodies and CollisionShapes. You create a collision shape, give it to a body, and then add the body to the world.
The only really different part is the MotionState, which (since I'm not really familiar with OgreBullet) might be taken care of for you. It's what "links" the rigid body to your scene node.
nord666
23-07-2008 16:13:46
Thanks a lot, subquantum!!!
I'm going to check the documentation right now.
nikki
24-07-2008 10:17:01
AFAIK restitution = bounciness.
subquantum
24-07-2008 14:01:22
Yes, that's correct... I realized that I read it wrong

It's from 0-1, and represents how much energy is reflected in a collision.
nord666
24-07-2008 16:36:39
Thanks nikki!
I didn't find any thing in the documentation