1 Reply Latest reply on Oct 21, 2013 2:45 AM by AMULI

    Collision plugin

    sandwichpuissant

      Hello!

      I've found this nice collision plugin

      http://e-smartdev.com/#!jsPluginList/hittestJQuery

       

      i'm trying to make it work in my project but for some reasons it doesn't.

      I have three symbols on my main stage:

           -one is a square named "char"

           -one is another square named "wall", it doesn't touch "char"

           -one is a button with this code on the "onclick" event:

                     hit = sym.$('char').objectHitTest({"object": sym.$("wall"), "transparency":true});

                     alert(hit);

       

      if my code was ok, it would alert "0" as the "char" symbol isn't colliding with the "wall" symbol, but it doesn't alert anything.

      is there anything wrong with my code?