Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Get width of screen/camera
« previous
next »
Print
Pages: [
1
]
Author
Topic: Get width of screen/camera (Read 3844 times)
TwistedSage
Newbie
Posts: 15
Get width of screen/camera
«
on:
January 08, 2015, 08:42:02 pm »
I’m using tk2dCamera.Instance.ScreenExtents.width to try to know when I placed objects off screen.
But it’s not quite working as expected. Do I need to use something else or are there any gotchas?
Thanks in advance
Odin
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Get width of screen/camera
«
Reply #1 on:
January 09, 2015, 06:01:41 pm »
.width is the width in world space, but the origin may be different. You should use xMin, xMax, etc. to get the right positions. If you're stuck with how it works, check the tk2dCameraAnchors, they anchor things to the extents of the screen.
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Get width of screen/camera