Jump to content

BOX2D collision rectangle within a body


Carolina
 Share

Recommended Posts

someone knows how to identify a rectangle within a body?

example:
this.myBody = new Phaser.Physics.Box2D.Body(this.game, null, this.rolyCenter.x, this.rolyCenter.y);
this.myBody.addRectangle(2, rolySide, this.rolyRadius * Math.cos(angle), this.rolyRadius * Math.sin(angle), angle);
this.myBody.addRectangle(2, rolySide, this.rolyRadius * Math.cos(angle), this.rolyRadius * Math.sin(angle), angle);

if a object did make collision with the body containing the rectangles, How can I know that rectangle collision made the object?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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