jit.phys.multiple change mass of individual object?
Nov 03 2019 | 12:06 pm
I have been trying this for a while now and am not getting anywhere... hope someone here with fresh eyes can help me out!!
I have a grid of spheres and I would like to be able to drop random ones. So far so good. I use jit.phys.multiple and jit.gl.multiple. I set the mass of all objects to 0, @filters none (I don't want the spheres to interact with each other), then randomly set the mass back to 1...
What I would like to happen next is that once a sphere has left the FOV that it is removed from the physics engine. I was trying to set the mass back to 0 but couldn't make it work. Also, each time I make another sphere fall, all previously fallen spheres reset and fall again... How do I tell jit.phys.multiple to ignore certain spheres and keep them at their current position off screen? Is there a good way of achieving this?
Here is the patch. Thanks so much in advance!!!