Hello Guest

Author Topic: tk2dcamera anchor  (Read 3621 times)

k3ch0ng

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
tk2dcamera anchor
« on: December 19, 2012, 01:26:08 pm »
Is it possible to use tk2dcamera anchor without tk2dcamera ?

I need my buttons to be anchored but also scaled proportionaly to device resolutions.
« Last Edit: December 19, 2012, 01:28:16 pm by k3ch0ng »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dcamera anchor
« Reply #1 on: December 20, 2012, 02:51:35 am »
No, the tk2dCameraAnchor only works with the tk2dCamera.

If you want to anchor something to the sides of an ortho camera, it is fairly straightforward. top/bottom, y = orthoSize, -orthoSize. left/right, x = -aspect * orthoSize, aspect * orthoSize.