jit.gl.phsydraw matrixoutput? or the like....

    Nov 14 2011 | 6:31 am
    I am wanting just the vector points from the objects used in the gl.physics environment. It would be nice if there was a matrixoutput option. Is there another efficient way to get at this data?
    Also... I will be needing this data without the bounds box being drawn. I could hand filter this data out but it would be nice to be able to select just the objects for viewing and not the bounds.

    • Nov 14 2011 | 7:15 am
      hi christopher. gl.physdraw is mainly intended for debugging purposes, so matrixoutput is not something that's going to be supported.
      however filtering of body types for physdraw will be supported in a future update.
      i'm not entirely sure what you're intentions are, but you can simply use matrixoutput of gridshapes attached to phys.bodies to get this information. you will want to use the new matrixoutput mode 2, which will apply the position, rotation, and scale values before outputting the matrix.
      if i misunderstand, please clarify your needs. thanks.
    • Nov 14 2011 | 7:20 am
      The problem with using the matrixoutput of gridshapes is that for a cube for example I get a whole bunch of vectors going to center of plane, when all I want is the outside edges like the gl.physdraw displays. How can I do this?
      The need is for a audio controlled laser project I am updating. I basically fill a buffer~ (looped) with x-y vector points between -1. and 1. that are sent out a hacked audio-card to the laser galvo controllers. I also need to know when these values belong to a unique object so I can control a 3rd laser-blanking channel.
    • Nov 14 2011 | 9:10 pm
      i would still recommend using gl.gridshape matrixoutput mode 2. below is a patch showing how to do this with a cube shape. you simply get the cells of the four corners of the shape. i found which cells are the corners with trial and error.
      HOWEVER, you've helped me uncover a bug with matrixoutput mode 2 related to rotations, so this is currently slightly broken, but will be fixed for the next update.
      you should still be able to test out the concept, and let me know if that will work for you.
      here's the patch: