DisabledGamer7 Posted January 25, 2015 Share Posted January 25, 2015 Hello,i have this problem i want to call a function when two body of the same group collide.Here is my try: pedone.body.setCollisionGroup(pedoneCollisionGroup); pedone.body.collides([pedoneCollisionGroup, playerCollisionGroup]); pedone.body.createBodyCallback(pedoneCollisionGroup, pedonehitpedone, this);the function pedonehitpedone is not triggered any suggestion? sorry i'm pretty new to phaser and coding... Link to comment Share on other sites More sharing options...
DisabledGamer7 Posted January 27, 2015 Author Share Posted January 27, 2015 Nobody? Link to comment Share on other sites More sharing options...
valueerror Posted January 27, 2015 Share Posted January 27, 2015 instead of createbodycallback you should use creategrouocallback ! Link to comment Share on other sites More sharing options...
DisabledGamer7 Posted January 28, 2015 Author Share Posted January 28, 2015 Now it works!Thank you very much! pedone.body.createGroupCallback(pedoneCollisionGroup, pedonehitpedone, this); Link to comment Share on other sites More sharing options...
Recommended Posts