Sustaining a jit.phys.body velocity

Jun 24, 2013 at 1:49pm

Sustaining a jit.phys.body velocity

Hi guys

I have a ball that I want to bounce off top and bottom wall but not the left and right wall of a worldbox, and also bounce off two other objects in the space. Can this be done? If so, any ideas would be a great help.

So yeah a bouncy ball that does not lose any of its velocity on impact.

And if anyone has any ideas how to make only two of the four walls of a worldbox absorb this velocity and stop the ball instantly that would be bonus!

All the best,


Jun 24, 2013 at 1:55pm

you can control a phys.body’s velocity with the aptly named @velocity attribute.
check out the following example patch:
Max 6.1/examples/jitter-examples/render/physics/phys.body.velocity.maxpat

this example also shows how to use static phys.bodys in place of the worldbox.

you can “absorb” a rigid body’s velocity by setting it to 0 when it collides with certain objects.
check the following example for info on testing phys.body collisions:
Max 6.1/examples/jitter-examples/render/physics/phys.body.collisions.maxpat

Jun 24, 2013 at 2:24pm

Okay I have checked out the example and have added a velocity with 10. 10. 10. being banged into it, however this is not being maintained on impact.

I have a collisions sub-patch but I am having difficulty grasping how to prevent the velocity from being absorbed on impact.

What is reducing the body’s velocity?

All the best,


Jun 25, 2013 at 11:31am

@velocity 0 0 0?


You must be logged in to reply to this topic.