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

Renderable bounds do not respect anchor point #833

Open
krojew opened this issue Nov 14, 2016 · 2 comments
Open

Renderable bounds do not respect anchor point #833

krojew opened this issue Nov 14, 2016 · 2 comments
Projects
Milestone

Comments

@krojew
Copy link

@krojew krojew commented Nov 14, 2016

When trying to get the bounding rect of a renderable through getBounds() (or just using .left etc.), the anchor point is totally ignored. This results in bounding box being offset in relation to what is actually drawn.

@obiot
Copy link
Member

@obiot obiot commented Dec 6, 2016

@parasyte @agmcleod as anchorPoint is also a vector object, we could probably also use a obvservable vector object for that one, and then just use it to update the bounding box position when the anchor point is modified. Should be easy to modify

@obiot obiot added this to the 5.0.0 milestone Jan 23, 2017
@obiot obiot added this to To Do in Roadmap Dec 4, 2017
@obiot obiot moved this from New Features (Core) to Improvements (Core) in Roadmap Dec 4, 2017
obiot added a commit that referenced this issue Dec 26, 2017
allows to properly takes in account anchor and transform for any me.Sprite object (including me.GUI), including proper detection of pointer Events.

this is first partial implementation only for me.Sprite objects, as applying the same to the base me.Renderable class will trigger further breaking changes in me.Entity

TODO :
- me.Renderable class, including me.Entity
- properly fix the debugPanel (Sprite BB drawing is off for now)
@obiot
Copy link
Member

@obiot obiot commented Dec 26, 2017

partially done at me.Sprite level

adrianhartanto0 pushed a commit to adrianhartanto0/melonJS that referenced this issue Feb 19, 2018
…ite Bounding Rect

allows to properly takes in account anchor and transform for any me.Sprite object (including me.GUI), including proper detection of pointer Events.

this is first partial implementation only for me.Sprite objects, as applying the same to the base me.Renderable class will trigger further breaking changes in me.Entity

TODO :
- me.Renderable class, including me.Entity
- properly fix the debugPanel (Sprite BB drawing is off for now)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
  
Improvements (Core)
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
@krojew @obiot and others
You can’t perform that action at this time.