Having the camera follow a path
While Torque 3D has the camera under user control most of the time, there are times when we want the camera to follow a defined path through the scene. This can be useful during an in-game cinematic, or as part of a shooter-on-rails game. In this recipe, we will set up a path using the World Editor and have the camera follow it.
Getting ready
We will be making TorqueScript changes in a project based on the Torque 3D Full
template, and try them out using the Empty Terrain
level. If you haven't already, use the Torque Project Manager (Project Manager.exe
) to create a new project from the Full
template. It will be found under the My Projects
directory.
How to do it...
In the following steps we will add a path to a level and have the camera follow it:
We will begin by adding an object to the level that we can click on. Start up the
Full
template-based game with theEmpty Terrain
level.Press F11 to open the World Editor.
Make sure the Object Editor is active by pressing...