Closed kenray closed 10 years ago
This definitely seems to be a bug. Any idea on when this might get fixed?
Please try the latest build in the dev branch. Your test case works as expected now under that release: https://github.com/photonstorm/phaser/tree/dev/build
In using Phaser 2, I ran into this situation... I have a sprite that slides in from offscreen on the right of the stage to a point partially on the stage. In Phaser 1.1.6, this worked properly, which you can see here: Phaser 1.1.6 Version.
In Phaser 2, the same code (adjusted to call out the Arcade physics engine explicitly) animates the sprite to a different location: Phaser 2 Version.
The source of the page(s) includes the JS, and when I dump the log of the various x/y coordinates, you can see the differences between the two; in 1.1.6 the first few lines of output show a stead progression from start point ("Start") (-167,561) to end ("Target") point (-23,501), showing both the current ("Curr") point (using sprite.x) as well as the current body ("CurrBody") point (using sprite.body.x):
In 2.0, the first few lines show a jump in both the Curr and CurrBody, resulting in the movements being way off:
And adding an additional arnold.anchor.setTo(0.5, 0.5) after physics is enabled didn't help (the values shifted by only a few pixels:
This looks to me like a legit bug, but I'm pretty new to Phaser, so if I am misunderstanding the new changes, please let me know.