jit.phys weired bouncing ball

klaus filip's icon
Max Patch
Copy patch and select New From Clipboard in Max.

hi there,
i am trying to make a simple bouncing ball with jit.physics.
but i cannot make it feel real.
please look into the attached patch. especially after 3rd bounce the time to the next collision is often staying nearly the same (sometimes even increasing!)
i tried to tweak around with damping and friction in the jit.phys.body with no success.
do i miss something? jit.phys.world'S fixed timestamp??
thanks for any hints
klaus

brendan mccloskey's icon

Hi
are you having the same issue I had recently?

Brendan

klaus filip's icon
Max Patch
Copy patch and select New From Clipboard in Max.

thanks brendan and thanks rob in the other thread..
i was not aware of the maxsubsteps attribute.
so i attach the same patch working much better now with changed initial settings:
(qmetro 20, jit.phys.world @fixedtimestep 20 @maxsubsteps 10, jit.phys.body @restitution 0.9 @damping 0. 0.)
btw, why does damping have only 2 dimensions?
best klaus

Ben Bracken's icon

The first value is for "linear" damping, meaning when the object moves in any direction. The second value is for "angular" damping, meaning when the object rotates or spins.

-Ben

cocamon's icon

hello, i'm trying to expand on this patch by using 6 cubes to have the ball bounce off of. However, it seems that no matter what i do, the balls (a) go through the walls or (b) the balls don't bounce back infinitely because the values of maxsubsteps and fixedtimestep are too large. Does anyone know how to get around this problem?

cheers,
C

Max Patch
Copy patch and select New From Clipboard in Max.