User Tools

Site Tools


scripting:components:wheeledsimulation

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: float

GetSteering()

GetSteering();

Returns current steering input in range < -1, 1 >

Return Type: float

SetSteering()

SetSteering(float in);

Sets steering input. \param in should be in range < -1, 1 >

Return Type: void

GetClutch()

GetClutch();

Returns current clutch value in range < 0, 1 > - 0 .. clutch disengaged 1 .. clutch fully engaged

Return Type: float

SetClutch()

SetClutch(float in);

Sets the clutch input \param in should be in range < 0, 1 >

Return Type: void

GetBrake()

GetBrake();

Returns current brake input in range < 0, 1 >

Return Type: 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: void

GetThrottle()

GetThrottle();

returns current throttle input in range < 0, 1 >

Return Type: float

SetThrottle()

SetThrottle(float in);

Sets throttle input \param in should be in range < 0, 1 >

Return Type: void

GetGear()

GetGear();

Returns index of currently engaged gear

Return Type: int

SetGear()

SetGear(int in);

Switches to given gear

Return Type: void

IsHandbrakeOn()

IsHandbrakeOn();

Returns whether handbrake is currently applied

Return Type: bool

EngineStart()

EngineStart();

Starts the engine

Return Type: void

EngineStop()

EngineStop();

Stops the engine

Return Type: void

EngineIsOn()

EngineIsOn();

Returns true if engine is running

Return Type: bool

EngineGetRPMIdle()

EngineGetRPMIdle();

Returns idle rpm of the engine

Return Type: float

EngineGetRPMPeakTorque()

EngineGetRPMPeakTorque(); 

Returns rpm at which engine provides maximal torque

Return Type: float

EngineGetRPMPeakPower()

EngineGetRPMPeakPower(); 

Returns rpm at which engine provides maximal power

Return Type: float

EngineGetRPMMax()

EngineGetRPMMax(); 

Returns maximal working rpm before engine explodes

Return Type: float

EngineGetRPM()

EngineGetRPM(); 

Returns current engine's RPM

Return Type: float

EngineGetRPMFeedback()

EngineGetRPMFeedback();

Returns RPM that is feeded back from rest of the powertrain

Return Type: float

EngineGetLoad()

EngineGetLoad();

Returns current engine load in range < 0, 1 >

Return Type: float

EngineGetPeakTorque()

EngineGetPeakTorque();

Returns initial engine's peak torque in Nm (newton-metre).

Return Type: float

EngineGetPeakTorqueState()

EngineGetPeakTorqueState();

Returns current engine's peak torque in Nm (newton-metre).

Return Type: float

EngineSetPeakTorqueState()

EngineSetPeakTorqueState(float peakTorque);

Sets current engine's peak torque. \param peakTorque must be in Nm (newton-metre).

Return Type: void

EngineGetPeakPower()

EngineGetPeakPower();

Returns initial engine's peak power in kW (kilowatts).

Return Type: float

EngineGetPeakPowerState()

EngineGetPeakPowerState();

Returns current engine's peak power in kW (kilowatts).

Return Type: float

EngineSetPeakPowerState()

EngineSetPeakPowerState(float peakPower);

Sets current engine's peak power. \param peakTorque must be in kW (kilowatts).

Return Type: float

GearboxGetEfficiency()

GearboxGetEfficiency();

Returns initial gearbox efficiency.

Return Type: float

GearboxGetEfficiencyState()

GearboxGetEfficiencyState();

Returns current gearbox efficiency.

Return Type: float

GearboxSetEfficiencyState()

GearboxSetEfficiencyState(float efficiency);

Sets current gearbox efficiency.

Return Type: void

GearboxGearsCount()

GearboxGearsCount();

Returns number of all gear ratios (neutral included).

Return Type: int

GearboxForwardGearsCount()

GearboxForwardGearsCount();

Returns number of forward gears.

Return Type: int

WheelCount()

WheelCount();

Returns number of wheels

Return Type: int

WheelGetIndex()

WheelGetIndex(string name);

Returns stored index of the wheel based on its name

Return Type: 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: 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: bool

WheelGetContactMaterial()

WheelGetContactMaterial(int wheelIdx);

Returns wheel contact material

Return Type: GameMaterial

WheelGetContactPosition()

WheelGetContactPosition(int wheelIdx);

Returns wheel contact position in world space

Return Type: vector

WheelGetContactNormal()

WheelGetContactNormal(int wheelIdx);

Returns wheel contact normal

Return Type: vector

WheelGetContactEntity()

WheelGetContactEntity(int wheelIdx); 

Returns entity which is in contact with wheel

Return Type: IEntity

WheelGetRPM()

WheelGetRPM(int wheelIdx);

Returns current wheel's RPM

Return Type: float

WheelGetRadius()

WheelGetRadius(int wheelIdx);

Returns initial wheel's radius

Return Type: float

WheelGetRadiusState()

WheelGetRadiusState(int wheelIdx);

Returns current wheel's radius

Return Type: float

WheelSetRadiusState()

WheelSetRadiusState(int wheelIdx, float radius);

Sets current wheel's radius

Return Type: float

WheelGetMass()

WheelGetMass(int wheelIdx); 

Returns initial wheel's mass

Return Type: float

WheelGetMassState()

WheelGetMassState(int wheelIdx);

Returns current wheel's mass

Return Type: float

WheelSetMassState()

WheelSetMassState(int wheelIdx, float mass);

Sets current wheel's mass

Return Type: float

WheelGetLongitudinalSlip()

WheelGetLongitudinalSlip(int wheelIdx);

Returns longitudinal slip of tyre

Return Type: float

WheelGetLateralSlip()

WheelGetLateralSlip(int wheelIdx);

Returns lateral slip of tyre

Return Type: float

WheelGetRollingDrag()

WheelGetRollingDrag(int wheelIdx);

Returns current wheel's rolling drag percentage

Return Type: float

WheelSetRollingDrag()

WheelSetRollingDrag(int wheelIdx, float drag);

Sets current rolling drag percentage

Return Type: void

WheelTyreGetRoughness()

WheelTyreGetRoughness(int wheelIdx);

Returns initial roughness of wheel's tyre surface

Return Type: float

WheelTyreGetRoughnessState()

WheelTyreGetRoughnessState(int wheelIdx);

Returns current roughness of wheel's tyre surface

Return Type: float

WheelTyreSetRoughnessState()

WheelTyreSetRoughnessState(int wheelIdx, float roughness);

Sets current roughness of wheel's tyre surface

Return Type: void

WheelTyreGetLongitudinalFriction()

WheelTyreGetLongitudinalFriction(int wheelIdx);

Returns tyre's initial longitudinal friction

Return Type: float

WheelTyreGetLongitudinalFrictionState()

WheelTyreGetLongitudinalFrictionState(int wheelIdx);

Returns tyre's current longitudinal friction

Return Type: float

WheelTyreSetLongitudinalFrictionState()

WheelTyreSetLongitudinalFrictionState(int wheelIdx, float lngFriction);

Sets tyre's current longitudinal friction

Return Type: void

WheelTyreGetLateralFriction()

WheelTyreGetLateralFriction(int wheelIdx);

Returns tyre's initial lateral friction

Return Type: float

WheelTyreGetLateralFrictionState()

WheelTyreGetLateralFrictionState(int wheelIdx);

Returns tyre's current lateral friction

Return Type: float

WheelTyreSetLateralFrictionState()

WheelTyreSetLateralFrictionState(int wheelIdx, float latFriction);

Sets tyre's current lateral friction

Return Type: void

GetNoiseSteerSensitivity()

GetNoiseSteerSensitivity();

Returns sensitivity against noise steer value of surface in range < 0, 1 >

Return Type: float

SetNoiseSteerSensitivity()

SetNoiseSteerSensitivity(float newValue);

Sets sensitivity on noise steer \param newValue should be in range < 0, 1 >

Return Type: void

GetRoughnessSensitivity()

GetRoughnessSensitivity();

Returns sensitivity against roughness value of surface in range < 0, 1 >

Return Type: float

SetRoughnessSensitivity()

SetRoughnessSensitivity(float newValue);

Sets sensitivity on roughness value of surface \param newValue should be in range < 0, 1 >

Return Type: void

scripting/components/wheeledsimulation.txt · Last modified: 2022/08/10 00:24 by jerryhopper

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki