True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

void TA::DynamicObjectCar::UpdateControls (
float   fSteeringAngle,
float   fAccelerator,
float   fBrake,
float   fHandBrake,
float   fSteeringHelp,
float   fTractionControl,
int   nGear = -1
 

Call this function to set the current state of the car's controls.

Parameters:
fSteeringAngle
The position of the car's steering wheel. -1.0f is full left and 1.0f if full right.
fAccelerator
The position of the car's accelerator. 1.0f for full acceleration. 0.0f is no acceleration.
fBrake
The position of the car's brake. 1.0f is for maximum braking. 0.0f is for no braking.
fHandBrake
The position of the car's handbrake. The handbrake only affects the wheels specified by the handbrake flag. 1.0f is for maximum braking. 0.0f is for no braking.
fSteeringHelp
Steering help alters steering sensitivity based on the car's speed so that the car is easy to control at both low and high speeds. 0.0f for no steering help. 1.0f for full steering help. When fSteeringHelp help is set to 1.0f and steering full left or full right, the steering wheel will be angled to give the maximum possible turning force to the car. If fSteeringHelp set to 0.0f and steering full left or full right while moving at high speeds the front wheels will be turned too far. This will cause the wheels to loose traction making the car understeer. In extreme understeer the car will tend to keep going in a straight line. In general, it is recommend steering help is set to 1.0f.
fTractionControl
Traction control helps keep the car's wheels in maximum grip. 0.0f for no traction control. 1.0f for full traction control. If fTractionControl is set to full, the accelerator and brakes are limited to so that the car's tires will not slip. Typically, this way the car will get the maximum braking or acceleration force possible.
Note:
On some surfaces such as dirt, a slipping tire may actually produce more force then a non-slipping tire, this can be controlled with TA::CarTemplate::FnSlipRatioToNormalisedTraction call back.
nGear
Sets the car's current gear. Call TA::CarTemplate::GetNumGears() to get the number of gears available. Gear 0 is reverse.
For automatic gear selection, set nGear is set to -1. When driving backwards with automatic gear selection fAccelerator will brake and fBrake accelerate.



© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.