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

Sprite.abs_x, abs_y, abs_pos, etc. #40

Open
acbart opened this issue Mar 16, 2014 · 0 comments
Open

Sprite.abs_x, abs_y, abs_pos, etc. #40

acbart opened this issue Mar 16, 2014 · 0 comments

Comments

@acbart
Copy link
Member

acbart commented Mar 16, 2014

Currently, there is no way to conveniently refer to sprite's coordinates in a global sense - applying any transformations from the parent views. That is, if you say Sprite.x, and that Sprite has a parent View with an offset, you have to manually calculate the absolute position on the screen.

Currently, we have a mechanism for handling this: collide_sprite/point/rect all use the internal _warp_collision_box method to correctly calculate absolute position. We just need new properties on sprites and views to easily get (but probably not set) the absolute position as calculated by the _warp_collision_box function.

This is also necessary for Views.

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

No branches or pull requests

1 participant