Reader small image

You're reading from  Torque 3D Game Development Cookbook

Product typeBook
Published inJan 2013
Reading LevelIntermediate
PublisherPackt
ISBN-139781849693547
Edition1st Edition
Languages
Right arrow
Author (1)
DAVID WYAND
DAVID WYAND
author image
DAVID WYAND

David Wyand has been using GarageGames' Torque Game Engine for the past 10 years. Among his other interestes are 3D graphics applications, computer networking and Artificial Intelligence for computer games.
Read more about DAVID WYAND

Right arrow

Using the TimeOfDay object to generate events


Torque 3D allows us to set up an automatic day/night cycle for our game's level, which will control either a Sun instance or position of the sun in the sky of a ScatterSky object. We may also create events that are triggered at specific times of the day.

In this recipe, we will set up a TimeOfDay object and use it to control the sun and lighting of a ScatterSky object, as well as trigger an event at a particular time.

Getting ready

We will be using a project based on the Torque 3D's Full template 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 can be found under the My Projects directory. Subsequently, start our new Full template game and load the Empty Terrain level.

How to do it...

In the following steps, we will add a TimeOfDay object to the level and have some events be triggered by it:

  1. Press F11 to open the World Editor. As we want to...

lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
Torque 3D Game Development Cookbook
Published in: Jan 2013Publisher: PacktISBN-13: 9781849693547

Author (1)

author image
DAVID WYAND

David Wyand has been using GarageGames' Torque Game Engine for the past 10 years. Among his other interestes are 3D graphics applications, computer networking and Artificial Intelligence for computer games.
Read more about DAVID WYAND