Created
February 24, 2012 09:44
-
-
Save kengonakajima/1899785 to your computer and use it in GitHub Desktop.
check any object is displayed in the window on MoaiSDK (3d and 2d)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local winx1,winy1 = fieldLayer:worldToWnd(x,y,z) | |
local winx2,winy2 = fieldLayer:worldToWnd(x+CELLUNITSZ*CHUNKSZ,y,z+CELLUNITSZ*CHUNKSZ) | |
if winx2 >= 0 and winy2 >= 0 and winx1 <= SCRW and winy1 <= SCRH then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment