Jump to content

Phaser 2.0 enableBody moves sprites


tarr11
 Share

Recommended Posts

I can verify this is happening by manually placing a new sprite at the same coordinates. they don't match against Tiled.

This wasn't happening in 1.6, so Im not sure if this is a bug or feature :-)

Should I reset my sprite locations to a different offset somehow?

Link to comment
Share on other sites

Looking at the createFromObjects code I was remembering rightly, Tiled does assume a bottom-left placement and I appear to have resolved that by setting the object anchor to x: 0, y: 1, which now conflicts with the Body setting using the anchor as an offset.

 

You can verify this by checking the anchor of mushrooms.children[0] for example.

 

What needs to happen is when createFromObjects runs, it looks-up the tile height and then adjusts the y coordinate by that amount. I'll add it to the list!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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