In cocos2d environment and box2D when an spherical object falls on a blunt slant obstacle, it moves really slowly, that's nauseating, if you have coded to not to have any interaction with world while object is in motion. Is there any way to get rid of this slow motion of object?
2 に答える
1
Try changing the friction value of the obstacle or the object.
b2FixtureDef objectFixtureDef;
objectFixtureDef.friction = 0.2f;
You can also change the restitution of an object (it's bouncyness).
于 2011-06-14T08:45:36.803 に答える
0
Bongeh is correct. Friction controls how much an object drags against other objects, restitution controls how much an object bounces off other objects, and damping controls velocity over time (like if you shoot a bullet into a pool of water).
于 2011-06-15T11:39:19.023 に答える