Game Development Community

t2dSceneObject.rendered?

by Kevin James · in Torque Game Builder · 05/04/2010 (11:18 am) · 2 replies

Is there an existing property to indicate if an object is rendered? I know I can get the camera area in world coordinates and check against object position, but I was wondering if TGB already had something built in. Thanks.

About the author

Hobbyist game developer -- free and open source games FTW.


#1
05/05/2010 (12:12 am)
No this isn't available because it'd require setting and resetting them each frame which is a waste for people who don't need it.

If you get the cameras area then perform a rectangular pick operation "scene.pickRect()" on the same area. This is all the camera does, it uses the exact same pick function to determine what objects are in the view.

Hope this helps.
#2
05/05/2010 (4:35 am)
Thanks, that's what I needed to know.