Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: displayOrigin of Zone object is not correct #3865

Closed
rexrainbow opened this issue Jul 25, 2018 · 2 comments
Closed

Bug: displayOrigin of Zone object is not correct #3865

rexrainbow opened this issue Jul 25, 2018 · 2 comments

Comments

@rexrainbow
Copy link
Contributor

rexrainbow commented Jul 25, 2018

Demo, see messages in console. Running at phaser 3.11.0

displayOriginX, displayOriginY :

this._displayOriginX = Math.round(this.originX * this.width);
this._displayOriginY = Math.round(this.originY * this.height);

Therefore the value of displayOriginX, displayOriginY should NOT be 0, 0, because that the originX, originY is 0.5, 0.5

@rexrainbow
Copy link
Contributor Author

Zone object might miss this.setOrigin(0.5, 0.5); in construct function.

Sorry I could not submit a PR because that my previous PR #3781 has not been processed yet.

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants