Hello Guest

Author Topic: Sprites are too big?  (Read 4121 times)

PsychoG

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 1
    • View Profile
Sprites are too big?
« on: June 05, 2013, 09:53:04 pm »
I'm making a 2-d side scroller and when I move the characters (or anything) the numbers needed are like 400-1000. Itseems a little ridiculous and makes collision detection tougher. Is this normal?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprites are too big?
« Reply #1 on: June 05, 2013, 10:29:02 pm »
I take it you're using the tk2dCamera?
The tk2dCamera maps 1 world unit -> 1 pixel. So to move your sprite from the left of the screen to the right = screen res in pixels.
You can get physics to work fine in it.

If you don't like using such big scales, you don't have to. Just use a normal orthographic camera.

Some docs to help explain why and what your choices are -
http://unikronsoftware.com/2dtoolkit/doc/2.00/tutorial/choosing_camera.html
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1746.0.html <- configuring physics correctly.