Using a convex shape as a zone
In Torque 3D, zones are used to control which 3D objects will be rendered within a level, based on the current camera position and rotation. If the camera cannot see into a zone, such as through a connected Portal
object (this acts like a window); or is not within the zone itself, the objects inside the zone are not
rendered. This allows us to have far more objects within the level than could normally be rendered all at once due to performance concerns. Normally, a Zone
object is box-shaped. In this recipe, we will learn how to create a new convex shape and use it as a Zone
object.
Getting ready
Start up Torque 3D and launch a level of your game, then press F11 to open the World Editor. As we want to create and manipulate special convex objects, the Sketch Tool should be selected (F5 or by using the Editors menu).
How to do it...
In the following steps, we will create a ConvexShape
object and turn it into a custom-shaped Zone
object:
We will start by creating...