Jump to content

p2 addPolygon


kestorr
 Share

Recommended Posts

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...