开发者

Object's too slow motion

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?


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).

http://www.box2d.org/manual.html#_Toc258082972


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜