Hello Guest

Author Topic: Posibility to position sprites in pixels?  (Read 3559 times)

mamamia

  • Guest
Posibility to position sprites in pixels?
« on: October 26, 2012, 11:07:36 pm »
Hi,

For me it would be really handy to set sprites in screen pixels. I mean for example 0,0 would be top/left or bottom/left and 0,480 would be top/right or bottom/right if resolution is 480x320. Is it possible with 2d toolkit?

If this is not possible how do you position things correclty in the screen? It is a bit hard to use world coordiantes. I'm so used to things lake gamemaker...

Thanks in advance.
« Last Edit: October 26, 2012, 11:11:50 pm by mamamia »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Posibility to position sprites in pixels?
« Reply #1 on: October 26, 2012, 11:54:28 pm »
Use the tk2dCamera, everything is in pixels there. (0, 0) is bottom left of the screen. (100, 100) is 100 by 100 pixels from the bottom left. Spend a bit of time learning how it works and it'll really help.

mamamia

  • Guest
Re: Posibility to position sprites in pixels?
« Reply #2 on: October 27, 2012, 12:55:55 am »
Thanks for the fast answer.