rptwsthi
rptwsthi

Reputation: 10172

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?

Upvotes: 0

Views: 359

Answers (2)

Aaron Goselin
Aaron Goselin

Reputation: 634

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

Upvotes: 0

Bongeh
Bongeh

Reputation: 2300

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

Upvotes: 1

Related Questions