rmxhaha Posted February 20, 2015 Share Posted February 20, 2015 at first my code working alright then I tried to add collisionGroup to all the sprites there is. Because I usually declare classes outside the create function I must move them inside because collisionGroup can only be created after the physics has been initiated which must be initiated inside the create function. After I finish all that an error occur onBeginContact is giving a null on it's first parameter which is strange because it should be giving a body under all circumstances.The second and third parameter is given as usual but I don't know if it's out of the ordinary because i never use those parameters. What cause this ? Link to comment Share on other sites More sharing options...
rmxhaha Posted February 21, 2015 Author Share Posted February 21, 2015 I think this is a bug within either phaser or p2js... I tried the CollisionGroup example and add panda.body.onBeginContact.add(function( first ){ if( null == first ) console.log( "Found the bug" ); }); the it Found The Bug is printeddelete the collision group then it doesn't happen again Link to comment Share on other sites More sharing options...
rmxhaha Posted February 24, 2015 Author Share Posted February 24, 2015 has no one come up with this problem before ? Link to comment Share on other sites More sharing options...
Recommended Posts