FPS DEMO: Player movement speed?
by Jeremy Collins · in Torque X 2D · 05/11/2008 (4:16 pm) · 4 replies
Can anyone help me figure out how player movement speed is determined in the FPS demo? I figure it is going to be a variable set in one of the components added to the player. I have been through the desertLevel.txscene and source code, but have had no luck determining just how this is calculated. Thanks.
#2
05/11/2008 (7:25 pm)
Interesting.... I will check the other TXSCENE files, but I can state without a doubt that if I change the Y offset for the third-person camera in the desertLevel.txscene the change does show when running the FPS demo.
#3
The FPS demo has FPSControlComponent inherit from T3DGroundControlComponent, so just add/edit the ForwardSpeed and/or StrafeSpeed values in the XML on the player template's FPSControlComponent.
05/12/2008 (5:29 pm)
T3DGroundControlComponent defines ForwardSpeed and StrafeSpeed, as well as AirControl (what fraction of normal speed the player can have when trying to move in the air).The FPS demo has FPSControlComponent inherit from T3DGroundControlComponent, so just add/edit the ForwardSpeed and/or StrafeSpeed values in the XML on the player template's FPSControlComponent.
#4
For reference--so no one is confused-- the desertLevel.txscene file is the level file used by the FPS game type in the FPSDemo.
05/14/2008 (5:35 pm)
Thanks, Russell. I guess since they were inherited the values used were the defaults and not ever written to the XML txscene file. I added the lines to the XML and it worked. For reference--so no one is confused-- the desertLevel.txscene file is the level file used by the FPS game type in the FPSDemo.
Torque 3D Owner Will O-Reagan
Modern Intrigues