jit.phys.body question

    Oct 26 2011 | 4:39 pm
    Very basic question about jit.phys.body.
    The docs say that it "represents a rigid body and collision shape in a physics simulation".
    But as far as I can tell, there's no way to add a collision shape only - am I missing something? Tried to find an attribute that would allow the rigid body to be toggled off - the most likely candidates seem to be enable_sim and kinematic - but both of these seem to take the object out of the physics sim altogether.
    So: is there any way to add a collider to an object *without* adding a rigidbody to that same object - such that the object is not affected by gravity etc but that other rigidbody objects bounce off it?
    Simple example: a terrain or a tabletop which stays where it is while other rigidbody objects collide with it.

    • Oct 28 2011 | 3:52 am
      hi perry. this is very easy to achieve. simply set the @mass attribute to 0. this causes the body to be "static", where dynamic forces have no effect, but collisions still occur.
      alternatively, if you are changing the body's postion or rotation, you will want to set @kinematic 1.
      hope that explains it.
    • Oct 29 2011 | 7:55 pm
      Another question, it looks like its posible create a body from a jit.gl.model; but for me is always static, like "out" of the world, any ideas? someone tryed it?
    • Oct 29 2011 | 9:40 pm
      this requires jit.gl.model @matrixout to work. unfortunately a bug slipped into the release version that broke this functionality. it will be fixed for the next update. the help file to jit.phys.body shows how to do this, when @matrixoutput i working again.
      thanks for your patience.
    • Nov 11 2011 | 12:00 pm
      It works perfect now with the update¡ Thank you¡