Scaling and new coordinates based off screen resolution
Posted
by
Atticus
on Game Development
See other posts from Game Development
or by Atticus
Published on 2011-11-28T22:52:50Z
Indexed on
2011/11/29
2:10 UTC
Read the original article
Hit count: 456
I'm trying to deal with different resolutions on Android devices.
Say I have a sprite at X,Y and dimensions W,H.
I understand how to properly scale the width and heigh dimensions depending on the screen size, but I am not sure how to properly reposition this sprite so that it exists in the same area that it should.
If I simply resize the width and heigh and keep X,Y at the same coordinates, things don't scale well.
How do I properly reposition? Multiply the coordinates by the scale as well?
© Game Development or respective owner