Js phys.world retrieve collisions in script

    May 24 2013 | 2:04 pm
    is it possible to retrieve information about the collisions made ​​between objects in javascript like the dumpout outlet in a patcher (knowing that all objects are instantiated in javascript, my 3D scene, my world etc...) I have examples like the ragdolls etc...to create objects but I did not find any solutions to retrieve collisions datas

    • May 24 2013 | 6:01 pm
      check out the following example patch: Max 6.1/examples/jitter-examples/render/physics/phys.world.collisions.js.maxpat
    • May 24 2013 | 10:54 pm
      one more time , thanks
      BUT, I have observed that the "duration" of contact remains at 0, can someone reproduce this default or it's only me ?
    • May 24 2013 | 11:22 pm
      ugh, yeah, that's a bug. thanks for catching, we'll get it fixed up.
    • May 25 2013 | 12:19 am
      may be you will be able to suggest me ideas, I want to make a roll of the dice, I must determine on which side falls my cube.
      During the collision report, the attribute 'normal' refers to the orientation of my item? I have to work from there?
    • May 25 2013 | 4:38 am
      so turns out this is a simple fix. you must simply free the individual collision-dicts when done processing them. so in the example javascript, add the following line at the end of the process_collisions function (line 50 or so): subd.freepeer();
      the collision normal won't tell you which side of the cube is facing up. you should be able to determine that simply from the body's orientation (quat, rotate, or rotatexyz attributes).