Game Development Community

Question on Input

by Brian Irvin · in Torque 3D Professional · 02/06/2011 (10:30 am) · 1 replies

I am working on a new flying vehicle class and am curious what source files is the input handled in for vehicles? The vehicle class im working on is similar to any aircraft that can take of and land verticaly then fly like a normal plane much like the Osprey. I copied the flying vehicle header and C++ file and renamed it, but no where did i see any code for input any help would be appreciated.

#1
02/06/2011 (1:50 pm)
Input is not handled directly by the vehicle classes. Instead, input (which occurs on the client) is handed to the ShapeBase classes (which do their simulation on the server) in the form of "moves." A good place to start looking is moveManager.cpp which shows you the state which can be tied to inputs. Also, take a look at the various processTick() methods which is where the processing of the move packets occurs. Finally, if you look at default.bind.cs, you will see how the input stuff is rigged up to the move system in the standard scripts.