Collision detection

    Nov 08 2011 | 12:16 pm
    Is it possible to have collision detection without the physics? I would like to be able to use the collision detection to trigger other kinds of events. Perhaps there is a way to set the physics so that they are not doing anything?
    Hope this is clear what I am asking....

    • Nov 10 2011 | 7:35 am
      you can set the gravity to "0 0 0" if that is what you are asking.
    • Nov 10 2011 | 5:18 pm
      hi markdavid. there are several options, but perhaps the easiest is to set @dynamics 0 on your this will remove all dynamic forces from the simulation and still allow you to get notifications from colliding bodies.
      an alternative is to set @mass 0 or @kinematic 1 on your jit.phys.bodies, which removes dynamic forces from individual bodies, instead of the whole simulation.
      let me know if anything is unclear.
    • Nov 11 2011 | 1:05 am
      thanks robert - I'll try it out
    • Nov 14 2011 | 6:39 am
      Hi Robert- For some reason this is not doing what I expect. What I was hoping to achieve was to use collision detection to act as a sensor field around an object. For example, in the patch below I would like to be able sense the red an blue balls, but not knock them around. thanks for your responses- kind regards- markdavid
    • Nov 14 2011 | 7:10 am
      it's a little difficult for me to tell what's happening in your patch and what's not working for you.
      take a look at the patch below which shows how to setup a physics world for collisions only. please let me know if you have further questions.
    • Nov 14 2011 | 3:57 pm
      Thanks Robert- that is helpful. I guess the best way to explain my patch is to say that I want my cake and eat it too. That is I want to mix dynamics - I imagine a jit.phys.body with no dynamics could be used as an invisible sensor field that is larger than the body (this could be used for obstacle avoidance, for example)
      Then a second jit.phys.body could be used to wrap dynamics around the object itself. This way if it didn't manage to avoid the obstacle there would be consequences...
      It was my understanding from your previous post that this might be possible: "an alternative is to set @mass 0 or @kinematic 1 on your jit.phys.bodies, which removes dynamic forces from individual bodies, instead of the whole simulation."
      Hope this makes more sense...
      BTW - I am very excited about these new features and having a lot of fun getting to know them :)
    • Nov 14 2011 | 7:29 pm
      ok, i think i understand. this is actually another upcoming feature of the physics objects. a future update will include an object called jit.phys.ghost, which will notify when other physics objects are colliding (your invisible sensor field) and allow you to apply forces to the colliding objects.
      does this sound like what you need?
    • Nov 15 2011 | 4:38 am
      Thanks for your response- sounds like I should wait for the updates to find out :)