====== VehiceWheeledSimulation ====== Provides functionality for wheeled vehicles. **class:** VehicleWheeledSimulation **Parent Class:** VehicleBaseSimulation **Location:** scripts/Game/generated/Vehicle/VehicleWheeledSimulation.c --- ===== Common usage ===== wip ===== Functions ===== ==== GetSpeedKmh() ==== GetSpeedKmh(); Returns current vehicle speed in km/h (kilometres per hour). Return Type: [[scripting:datatypes#float]] ==== GetSteering() ==== GetSteering(); Returns current steering input in range < -1, 1 > Return Type: [[scripting:datatypes#float]] ==== SetSteering() ==== SetSteering(float in); Sets steering input. \param in should be in range < -1, 1 > Return Type: [[scripting:datatypes#void]] ==== GetClutch() ==== GetClutch(); Returns current clutch value in range < 0, 1 > - 0 .. clutch disengaged 1 .. clutch fully engaged Return Type: [[scripting:datatypes#float]] ==== SetClutch() ==== SetClutch(float in); Sets the clutch input \param in should be in range < 0, 1 > Return Type: [[scripting:datatypes#void]] ==== GetBrake() ==== GetBrake(); Returns current brake input in range < 0, 1 > Return Type: [[scripting:datatypes#float]] ==== SetBreak() ==== SetBreak(float in, bool hb); Sets brake inputs \param in should be in range < 0, 1 > \param hb indicating whether handbrake should be applied Return Type: [[scripting:datatypes#void]] ==== GetThrottle() ==== GetThrottle(); returns current throttle input in range < 0, 1 > Return Type: [[scripting:datatypes#float]] ==== SetThrottle() ==== SetThrottle(float in); Sets throttle input \param in should be in range < 0, 1 > Return Type: [[scripting:datatypes#void]] ==== GetGear() ==== GetGear(); Returns index of currently engaged gear Return Type: [[scripting:datatypes#int]] ==== SetGear() ==== SetGear(int in); Switches to given gear Return Type: [[scripting:datatypes#void]] ==== IsHandbrakeOn() ==== IsHandbrakeOn(); Returns whether handbrake is currently applied Return Type: [[scripting:datatypes#bool]] ==== EngineStart() ==== EngineStart(); Starts the engine Return Type: [[scripting:datatypes#void]] ==== EngineStop() ==== EngineStop(); Stops the engine Return Type: [[scripting:datatypes#void]] ==== EngineIsOn() ==== EngineIsOn(); Returns true if engine is running Return Type: [[scripting:datatypes#bool]] ==== EngineGetRPMIdle() ==== EngineGetRPMIdle(); Returns idle rpm of the engine Return Type: [[scripting:datatypes#float]] ==== EngineGetRPMPeakTorque() ==== EngineGetRPMPeakTorque(); Returns rpm at which engine provides maximal torque Return Type: [[scripting:datatypes#float]] ==== EngineGetRPMPeakPower() ==== EngineGetRPMPeakPower(); Returns rpm at which engine provides maximal power Return Type: [[scripting:datatypes#float]] ==== EngineGetRPMMax() ==== EngineGetRPMMax(); Returns maximal working rpm before engine explodes Return Type: [[scripting:datatypes#float]] ==== EngineGetRPM() ==== EngineGetRPM(); Returns current engine's RPM Return Type: [[scripting:datatypes#float]] ==== EngineGetRPMFeedback() ==== EngineGetRPMFeedback(); Returns RPM that is feeded back from rest of the powertrain Return Type: [[scripting:datatypes#float]] ==== EngineGetLoad() ==== EngineGetLoad(); Returns current engine load in range < 0, 1 > Return Type: [[scripting:datatypes#float]] ==== EngineGetPeakTorque() ==== EngineGetPeakTorque(); Returns initial engine's peak torque in Nm (newton-metre). Return Type: [[scripting:datatypes#float]] ==== EngineGetPeakTorqueState() ==== EngineGetPeakTorqueState(); Returns current engine's peak torque in Nm (newton-metre). Return Type: [[scripting:datatypes#float]] ==== EngineSetPeakTorqueState() ==== EngineSetPeakTorqueState(float peakTorque); Sets current engine's peak torque. \param peakTorque must be in Nm (newton-metre). Return Type: [[scripting:datatypes#void]] ==== EngineGetPeakPower() ==== EngineGetPeakPower(); Returns initial engine's peak power in kW (kilowatts). Return Type: [[scripting:datatypes#float]] ==== EngineGetPeakPowerState() ==== EngineGetPeakPowerState(); Returns current engine's peak power in kW (kilowatts). Return Type: [[scripting:datatypes#float]] ==== EngineSetPeakPowerState() ==== EngineSetPeakPowerState(float peakPower); Sets current engine's peak power. \param peakTorque must be in kW (kilowatts). Return Type: [[scripting:datatypes#float]] ==== GearboxGetEfficiency() ==== GearboxGetEfficiency(); Returns initial gearbox efficiency. Return Type: [[scripting:datatypes#float]] ==== GearboxGetEfficiencyState() ==== GearboxGetEfficiencyState(); Returns current gearbox efficiency. Return Type: [[scripting:datatypes#float]] ==== GearboxSetEfficiencyState() ==== GearboxSetEfficiencyState(float efficiency); Sets current gearbox efficiency. Return Type: [[scripting:datatypes#void]] ==== GearboxGearsCount() ==== GearboxGearsCount(); Returns number of all gear ratios (neutral included). Return Type: [[scripting:datatypes#int]] ==== GearboxForwardGearsCount() ==== GearboxForwardGearsCount(); Returns number of forward gears. Return Type: [[scripting:datatypes#int]] ==== WheelCount() ==== WheelCount(); Returns number of wheels Return Type: [[scripting:datatypes#int]] ==== WheelGetIndex() ==== WheelGetIndex(string name); Returns stored index of the wheel based on its name Return Type: [[scripting:datatypes#int]] ==== WheelGetPosition() ==== WheelGetPosition(int wheelIdx, float displacement = 0.0); Get the wheel position based on suspension. \param wheelIdx Index of the wheel \param displacement 0 means the position of the wheel when the suspension is fully extended ( zero g ). \return Returns wheel position in local space. Return Type: [[scripting:datatypes#vector]] ==== WheelGetName() ==== WheelGetName(int wheelIdx); Returns name of the wheel based on its index Return Type: string ==== WheelHasContact() ==== WheelHasContact(int wheelIdx); Returns true if wheel has contact with ground or other object Return Type: [[scripting:datatypes#bool]] ==== WheelGetContactMaterial() ==== WheelGetContactMaterial(int wheelIdx); Returns wheel contact material Return Type: [[scripting:datatypes#GameMaterial]] ==== WheelGetContactPosition() ==== WheelGetContactPosition(int wheelIdx); Returns wheel contact position in world space Return Type: [[scripting:datatypes#vector]] ==== WheelGetContactNormal() ==== WheelGetContactNormal(int wheelIdx); Returns wheel contact normal Return Type: [[scripting:datatypes#vector]] ==== WheelGetContactEntity() ==== WheelGetContactEntity(int wheelIdx); Returns entity which is in contact with wheel Return Type: [[scripting:datatypes#IEntity ]] ==== WheelGetRPM() ==== WheelGetRPM(int wheelIdx); Returns current wheel's RPM Return Type: [[scripting:datatypes#float]] ==== WheelGetRadius() ==== WheelGetRadius(int wheelIdx); Returns initial wheel's radius Return Type: [[scripting:datatypes#float]] ==== WheelGetRadiusState() ==== WheelGetRadiusState(int wheelIdx); Returns current wheel's radius Return Type: [[scripting:datatypes#float]] ==== WheelSetRadiusState() ==== WheelSetRadiusState(int wheelIdx, float radius); Sets current wheel's radius Return Type: [[scripting:datatypes#float]] ==== WheelGetMass() ==== WheelGetMass(int wheelIdx); Returns initial wheel's mass Return Type: [[scripting:datatypes#float]] ==== WheelGetMassState() ==== WheelGetMassState(int wheelIdx); Returns current wheel's mass Return Type: [[scripting:datatypes#float]] ==== WheelSetMassState() ==== WheelSetMassState(int wheelIdx, float mass); Sets current wheel's mass Return Type: [[scripting:datatypes#float]] ==== WheelGetLongitudinalSlip() ==== WheelGetLongitudinalSlip(int wheelIdx); Returns longitudinal slip of tyre Return Type: [[scripting:datatypes#float]] ==== WheelGetLateralSlip() ==== WheelGetLateralSlip(int wheelIdx); Returns lateral slip of tyre Return Type: [[scripting:datatypes#float]] ==== WheelGetRollingDrag() ==== WheelGetRollingDrag(int wheelIdx); Returns current wheel's rolling drag percentage Return Type: [[scripting:datatypes#float]] ==== WheelSetRollingDrag() ==== WheelSetRollingDrag(int wheelIdx, float drag); Sets current rolling drag percentage Return Type: [[scripting:datatypes#void]] ==== WheelTyreGetRoughness() ==== WheelTyreGetRoughness(int wheelIdx); Returns initial roughness of wheel's tyre surface Return Type: [[scripting:datatypes#float]] ==== WheelTyreGetRoughnessState() ==== WheelTyreGetRoughnessState(int wheelIdx); Returns current roughness of wheel's tyre surface Return Type: [[scripting:datatypes#float]] ==== WheelTyreSetRoughnessState() ==== WheelTyreSetRoughnessState(int wheelIdx, float roughness); Sets current roughness of wheel's tyre surface Return Type: [[scripting:datatypes#void]] ==== WheelTyreGetLongitudinalFriction() ==== WheelTyreGetLongitudinalFriction(int wheelIdx); Returns tyre's initial longitudinal friction Return Type: [[scripting:datatypes#float]] ==== WheelTyreGetLongitudinalFrictionState() ==== WheelTyreGetLongitudinalFrictionState(int wheelIdx); Returns tyre's current longitudinal friction Return Type: [[scripting:datatypes#float]] ==== WheelTyreSetLongitudinalFrictionState() ==== WheelTyreSetLongitudinalFrictionState(int wheelIdx, float lngFriction); Sets tyre's current longitudinal friction Return Type: [[scripting:datatypes#void]] ==== WheelTyreGetLateralFriction() ==== WheelTyreGetLateralFriction(int wheelIdx); Returns tyre's initial lateral friction Return Type: [[scripting:datatypes#float]] ==== WheelTyreGetLateralFrictionState() ==== WheelTyreGetLateralFrictionState(int wheelIdx); Returns tyre's current lateral friction Return Type: [[scripting:datatypes#float]] ==== WheelTyreSetLateralFrictionState() ==== WheelTyreSetLateralFrictionState(int wheelIdx, float latFriction); Sets tyre's current lateral friction Return Type: [[scripting:datatypes#void]] ==== GetNoiseSteerSensitivity() ==== GetNoiseSteerSensitivity(); Returns sensitivity against noise steer value of surface in range < 0, 1 > Return Type: [[scripting:datatypes#float]] ==== SetNoiseSteerSensitivity() ==== SetNoiseSteerSensitivity(float newValue); Sets sensitivity on noise steer \param newValue should be in range < 0, 1 > Return Type: [[scripting:datatypes#void]] ==== GetRoughnessSensitivity() ==== GetRoughnessSensitivity(); Returns sensitivity against roughness value of surface in range < 0, 1 > Return Type: [[scripting:datatypes#float]] ==== SetRoughnessSensitivity() ==== SetRoughnessSensitivity(float newValue); Sets sensitivity on roughness value of surface \param newValue should be in range < 0, 1 > Return Type: [[scripting:datatypes#void]]