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

Locking and hiding the mouse while the right mouse button is down


Using the left mouse button to select and the right mouse button to activate camera rotation is a common control scheme found in many games that allow for free looking, such as role-playing games. In this recipe, we will modify the default FPS (First Person Shooter) camera control behavior of Torque 3D and allow holding down the right mouse button to control the rotation of the camera to freely look around.

Getting ready

We will be making TorqueScript changes in a project based on the Torque 3D Full template, and will try them out using the Empty Terrain level. If you haven't already, use the Torque Toolbox Project Manager (Project Manager.exe) to create a new project from the Full template. This template can be found under the My Projects folder. Next, start up your favorite script editor, such as Torsion, and let's get going!

How to do it...

In the following steps we will alter Torque 3D's default mouse behavior to freely...

lock icon
The rest of the page is locked
Previous PageNext Page
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