Jump to content

Is it possible to add a body to the game without a sprite using Arcade Physics?


Legomite
 Share

Recommended Posts

var mySprite = game.add.sprite(0,0);

mySprite.width = 100;

mySprite.height = 100;

game.physics.arcade.enable(mySprite);

//in the render function use debug to see it

game.debug.body(mySprite);

From the top of my head, might not be accurate.

You could also use a sprite and set alpha to 0 but that might be bad performance wise.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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