jit.phys.body infinite movement within a sphere

    Jun 21 2012 | 3:23 pm
    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,

    • Jun 21 2012 | 6:00 pm
      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.
    • Jun 21 2012 | 9:48 pm
      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,
    • Jun 22 2012 | 6:21 pm
      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.
    • Jun 22 2012 | 11:41 pm
      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,
    • Jun 25 2012 | 10:08 pm
      i think this is just what happens when you set the @restitution to 1. perhaps try setting it to 0.99?
    • Jun 26 2012 | 10:07 am
      Same thing, nothing change with @restitution to 0.99.... Press one or two times [impulse 1 1 1] and you will see. Any idea?
    • Jun 26 2012 | 5:24 pm
      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/
    • Jun 28 2012 | 5:59 pm
      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,
    • Jul 28 2012 | 8:15 pm
      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?
    • Jul 28 2012 | 8:42 pm
      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.
    • Jul 29 2012 | 3:53 pm
      looking forward for any news! :)
    • Jul 27 2014 | 3:33 pm
      Here's a patch in which balls in a box are given an impulse by respective bands of the bark scale (25 bands, 24 of which are divided across each ball; 6 impulses upon each ball for each direction).
      Would be really exciting to create this with a sphere, capsule, cone, ice-cream sandwich, etc. whatever shape you would add to the phys.world object - any plans to do so?