|
A wheeled vehicle. More...
Public Member Functions | |
int | getWheelCount () |
Get the number of wheels on this vehicle. | |
bool | setWheelPowered (int wheel, bool powered) |
Set whether the wheel is powered (has torque applied from the engine). | |
bool | setWheelSpring (int wheel, WheeledVehicleSpring spring) |
Set the WheeledVehicleSpring datablock for this wheel. | |
bool | setWheelSteering (int wheel, float steering) |
Set how much the wheel is affected by steering. | |
bool | setWheelTire (int wheel, WheeledVehicleTire tire) |
Set the WheeledVehicleTire datablock for this wheel. | |
Static Public Attributes | |
static bool | isRenderable |
Disables rendering of all instances of this type. | |
static bool | isSelectable |
Disables selection of all instances of this type. |
A wheeled vehicle.
int WheeledVehicle::getWheelCount | ( | ) |
Get the number of wheels on this vehicle.
bool WheeledVehicle::setWheelPowered | ( | int | wheel, | |
bool | powered | |||
) |
Set whether the wheel is powered (has torque applied from the engine).
A rear wheel drive car for example would set the front wheels to false, and the rear wheels to true.
wheel | index of the wheel to set | |
powered | flag indicating whether to power the wheel or not |
bool WheeledVehicle::setWheelSpring | ( | int | wheel, | |
WheeledVehicleSpring | spring | |||
) |
Set the WheeledVehicleSpring datablock for this wheel.
wheel | index of the wheel to set | |
spring | WheeledVehicleSpring datablock |
%obj.setWheelSpring( 0, FrontSpring );
bool WheeledVehicle::setWheelSteering | ( | int | wheel, | |
float | steering | |||
) |
Set how much the wheel is affected by steering.
The steering factor controls how much the wheel is rotated by the vehicle steering. For example, most cars would have their front wheels set to 1.0, and their rear wheels set to 0 since only the front wheels should turn.
Negative values will turn the wheel in the opposite direction to the steering angle.
wheel | index of the wheel to set | |
steering | steering factor from -1 (full inverse) to 1 (full) |
bool WheeledVehicle::setWheelTire | ( | int | wheel, | |
WheeledVehicleTire | tire | |||
) |
Set the WheeledVehicleTire datablock for this wheel.
wheel | index of the wheel to set | |
tire | WheeledVehicleTire datablock |
%obj.setWheelTire( 0, FrontTire );
bool WheeledVehicle::isRenderable [static] |
Disables rendering of all instances of this type.
Reimplemented from Vehicle.
bool WheeledVehicle::isSelectable [static] |
Disables selection of all instances of this type.
Reimplemented from Vehicle.