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
Rotate around anchor property #93
Conversation
Bump here. |
Hey @floatdrop, This code is great - it kind of makes the sprite anchor and the display object anchor behave differently though, which could lead to confusion. What are peeps thoughts on this? |
Shouldn't the Sprite's anchor be it's inherited DisplayObject anchor? |
Well, it's a bit tricky, @Fishrock123. Sprite anchor use percentage to set an origin - an this is awesome feature, that I like. var ax = this instanceof Sprite ? 0 : this.anchor.x;
var ay = this instanceof Sprite ? 0 : this.anchor.y; Second: drop the percentage functionality from Sprite. |
Why not just have sprite convert from percentage to pixels when set via EDIT: or even better: |
Seems working to me. |
Bump again. (Sorry for persistence). |
No worries @floatdrop ! |
Hey @floatdrop just updated the pixi build.. a display object now has a pivot point.. I used your code and it works a treat 👍 Thanks! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
PIXI.Sprite have nice anchor property, but DisplayObject haven't. This creates difficulties to create camera, that rotates around the player (#83). Needs to be checked twice.