Login
Community
DARK THEME

How To Get The Top,Bottom,Left And Right Of The Screen?

Title...

The coordinates?
You can use screen.width and screen.height to get them, they give you the overall width&height of the screen.
To get the X/Y coordinate range just divide those values by 2 (since the origin is in the center).

xmax =  screen.width/2
xmin = -xmax
ymax =  screen.height/2
ymin = -ymin

That implies everything is at default and the origin has not been changed with screen.setTranslation( tx, ty )
Then you have to adjust accordingly to the situation.


Live Long And Tinker

ok tnx :D

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community