Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Latest commit

 

History

History
224 lines (115 loc) · 6.86 KB

SceneObject.rst

File metadata and controls

224 lines (115 loc) · 6.86 KB

SceneObject

A networkable object that exists in the 3D world.

Inherit:

NetObject

Description

A networkable object that exists in the 3D world.

The SceneObject class provides the foundation for 3D objects in the Engine. It exposes the functionality for:

You do not typically work with SceneObjects themselves. The SceneObject provides a reference within the game world (the scene), but does not render to the client on its own. The same is true of collision detection beyond that of the bounding box. Instead you use one of the many classes that derrive from SceneObject, such as TSStatic.

Difference Between setHidden() and isRenderEnabled

When it comes time to decide if a SceneObject should render or not, there are two methods that can stop the SceneObject from rendering at all. You need to be aware of the differences between these two methods as they impact how the SceneObject is networked from the server to the client.

The first method of manually controlling if a SceneObject is rendered is through its SceneObject::isRenderEnabled property. When set to false the SceneObject is considered invisible but still present within the scene. This means it still takes part in collisions and continues to be networked.

The second method is using the setHidden() method. This will actually remove a SceneObject from the scene and it will no longer be networked from the server to the cleint. Any client-side ghost of the object will be deleted as the server no longer considers the object to be in scope.

Methods

Fields