kestorr Posted September 28, 2014 Share Posted September 28, 2014 Hello there. Im trying to use the addPolygon on the body of a sprite but it seems that after i do that, the body will not collide with others. game.physics.p2.enable(objecttr100x86Sprite);objecttr100x86Sprite.body.clearShapes();objecttr100x86Sprite.body.addPolygon( {} , -1, -41 , 47, 42 , -47, 42 , -47, 43 );objecttr100x86Sprite.body.velocity.y=10; So now this body is not colliding with others for some reason. Link to comment Share on other sites More sharing options...
valueerror Posted September 29, 2014 Share Posted September 29, 2014 try:game.physics.p2.enable(objecttr100x86Sprite, true);and have a look at the polygon (that should be drawn then).. is it applied correctly? Link to comment Share on other sites More sharing options...
kestorr Posted September 29, 2014 Author Share Posted September 29, 2014 Hey there. I have managed to fix this issue. The vertices were not applied correctly as you pointed out. Thanks for the reply. valueerror 1 Link to comment Share on other sites More sharing options...
Recommended Posts