Dynamic ball wont bounce.

I want ball to bounce off another ball (player head) that is located on the "floor".
When player head is on the floor ball sticks to the head as it was non-elastic collision.
I am controlling head ball using setLinearVelocity(), and when I make player jump ball collision is working elastically.


Maybe I am using wrong approach to control "player" ?
At the beginning I used static object for player, but then if I animate player "jump", collision with ball just makes ball speed equal to head speed.
martinsmelnais wrote:
I want ball to bounce off another ball (player head) that is located on the "floor".
When player head is on the floor ball sticks to the head as it was non-elastic collision.


Sorry, seems like I missed FAQ first.
I cannot provide source, as its too long and buggy. 😁

Anyway problem was solved more or less by
1) fixing one bug on my side (Linear velocity y component was updated all the time for player).
2) Increasing restitution for player and ball.

It is not easy to find correct values to make everything look nice.

is it possible to set maximal body velocity ?
i found
static public const b2_maxTranslation:Number = 2.0;
in settings.as but its said i shouldnt change this value.
2 meters per frame is quite fast. You are probably making your world too large, it works best with objects about 1 unit in size, i.e. different from pixel scale. If you just change that value you'll get problems from other more subtle settings not being right.

Original thread: https://box2d.org/forum/viewtopic.php?t=4947