- Home /
Question by
sagarkondhare · Sep 25, 2013 at 01:03 PM ·
sizeworldspacecoordinate-system
how can i get objects size according to world coordinate?
I want to draw number of objects in half of screen in rows and columns. But i don't want those drawn in next half of screen so i have to find out that if my object is being drawn on next half of screen or not.
Thanks.
Comment
It sounds like this would be most easily accomplished by simply using the camera's viewport to limit rendering to one half of the screen. By the way, why is this question marked community wiki?
Answer by robertbu · Sep 25, 2013 at 01:53 PM
Assuming your camera is axes aligned, you can use Renderer.bounds.
From the reference: Using bounds is convenient to make rough approximations about the object's location and its extents.
If your camera is not axes aligned, then things get more complicated.