panzhiyi3
01-04-2011 14:01:59
I'm using VS2008(without SP).
In my project,I found all the objects drop very slow just like they were on the moon...Then I run the bullet demo and ogreBullet demo,it seems that the problem is come from bullet!?Every object drop down in a very slow velocity.
And I have recompiled them,the problem doesn't solved...please help
panzhiyi3
06-05-2011 14:34:25
OK...I have solved it.It very funny.
I have to call mWorld->stepSimulation(elapsedTime, 4) twice in frameStarted(),But in the demo of OgreBullet,they did not do this.
But...Why would this happen? update the world twice in one frame?
captaincrunch80
16-07-2011 01:37:18
I prefer using root->startRender instead of a custom renderloop. Having my Physics, AI and Input in Framelisteners.
The whole program works over callbacks.
Maybe it is another problem:
Check your world scale!
Read this:
http://bulletphysics.org/mediawiki-1.5.8/index.php/Scaling_The_World
Example:
Take an object of your world where you can guess the real size.
Lets say your character is 2m high in real life.
now check the entity bounding box height.
oh wow... he is like 12 units big.
that means bullet will think he is 12m high... what will result in a deeper fall if he is drunk and falls from the chair. He will fall 6 times slower for your eye, if the objects around him are scaled the same way like he is.
Solution 1: Scale everything down to 1 Unit = 1 m
Solution 2: Leave the scale to your graphics, but scale each body mass (etc.) and the physics gravity accordingly. - In this case, leaving the graphics as they are: Gravity to 60 and the guys body mass to 600 (if he weights 100kg in real life). Then he will fall correct for the eye.
This is no physics engine error, it is just incompatible scaling: graphics <-> phys engine. (making a stone to a meteor for the model)
You must consider this scaling issue for each and every physics engine out there.