jit.phys.body infinite movement within a sphere

Jun 21, 2012 at 3:23pm

jit.phys.body infinite movement within a sphere

Hi,
Sorry for this question but I can’t figure out how to accomplish it…
I want just to pick (with the mouse) a jit.phys.body and I want the object bouncing infinitely inside a sphere.

Is this possible?

Any help would be appreciated

All the best,

e69

#46075
Jun 21, 2012 at 6:00pm

you should be able to set jit.phys.body @damping 0 0, @friction 0 and @restitution 1, and jit.phys.world @gravity 0 0 0.

then when you send an impulse to the rigid-body, it will bounce forever.

give that a try let me know if it doesn’t work.

#165977
Jun 21, 2012 at 9:48pm

Thank you very much Robert!

But doesn’t work for me.
Here’s the patch from help file.
And is possible to have others shapes of world other than a worldbox?

All the best,

e69

– Pasted Max Patch, click to expand. –
#165978
Jun 22, 2012 at 6:21pm

ahh yes. the problem is that the planes used in the worldbox are really more of a helper feature. you can’t set the material properties on them.
the solution is to create your own world bounds, using jit.phys.body, and setting the properties mentioned above.

eg, in the phys.body help patch, there is a cube shape rigid body that is scaled and positioned to be the “floor”

try using 6 static rigid bodies, instead of the worldbox, and your ball should bounce forever.

#165979
Jun 22, 2012 at 11:41pm

Thanx again Robert!

It works but the sphere begins to accelerated and accelerated until it’s start again… Any idea?

Here’s the example,

All the best,

e69

– Pasted Max Patch, click to expand. –
#165980
Jun 25, 2012 at 10:08pm

i think this is just what happens when you set the @restitution to 1. perhaps try setting it to 0.99?

#165981
Jun 26, 2012 at 10:07am

Same thing, nothing change with @restitution to 0.99….
Press one or two times [impulse 1 1 1] and you will see.
Any idea?

Best,

e69

– Pasted Max Patch, click to expand. –
#165982
Jun 26, 2012 at 5:24pm

maybe try asking at the bullet forum. bullet is the physics engine used behind the scenes in the jit.phys objects.

http://www.bulletphysics.org/Bullet/phpBB3/

#165983
Jun 28, 2012 at 5:59pm

Ooops, I just found a library PMPD to do that….
I’m sorry but I thought this was much more simple…

Anyway thank you for your answers.

All the best,

e69

#165984
Jul 28, 2012 at 8:15pm

I’m making a beer pong emulation for Kinect in which the ball and rims of the cups are jit.phys.body objects and I am struggling to get the ball to move naturally. There are two issues. There seems to be a significant amount of air resistance even when damping is 0. and the ball rolls across the tops of the cups rather than bouncing even when restitution is set to 1. for both the cups and the ball. Both objects have mass 1. and the cups have kinematic 1. so that they will not move when struck. I would paste the patch but you need the kinect to use it properly. Any suggestions?

#165985
Jul 28, 2012 at 8:42pm

hard to say without seeing the patch.
have you tried adjusting the friction values?

try removing the kinect part and replacing it with something like a drunk object before posting it.

#165986
Jul 29, 2012 at 3:53pm

looking forward for any news! :)

#165987

You must be logged in to reply to this topic.