245 void createVehicle(
string vehicleName,
int sceneEntityID,
float posX,
float posY,
float posZ,
float rotW,
float rotX,
float rotY,
float rotZ);
272 int getVehicleID(
int sceneEntityID,
string vehicleName );
282 int getRPM(
int vehicleID ) ;
289 void addChassis(
int vehicleID,
int chassisIndex,
float posXfloat posY,
float posZ,
float scaleX,
float scaleY,
float scaleZ );
290 void addWheel(
int vehicleID,
int vehicleID,
int wheelIndex,
int driveWheel,
int steerWheel,
float posX,
float posY,
float posZ);
293 void setWheelMesh(
int vehicleID,
string wheelMeshName );
295 void setWheelRadius(
int vehicleID,
int wheelIndex,
float radius );
323 void setMotorTorque(
int vehicleID,
int wheelIndex,
float torque );
324 void setBrakeTorque(
int vehicleID,
int wheelIndex,
float torque );
325 void setPosition(
int vehicleID,
float posX,
float posY,
float posZ );
326 void setOrientation(
int vehicleID,
float rotW,
float rotX,
float rotY,
float rotZ );
330 void setRPM(
int vehicleID,
int minRpmToGearDown,
int maxRpmToGearUp,
int minRpm,
int maxRpm );
331 void setMass(
int vehicleID,
float mass );
336 void useWheelParticle(
int vehicleID,
int wheelIndex,
int useParticle [0 or 1] );
337 void setWheelParticle(
int vehicleID,
int wheelIndex,
string particleName );
341 void setCenterOfMass(
int vehicleID,
float offsetX,
float offsetY,
float offsetZ );
344 void setLatWheelFrictionSettings(
int vehicleID,
int wheelIndex,
float asymptoteSlip,
float asymptoteValue,
float extremumSlip,
float extremumValue,
float stiffnessFactor );
345 void setLongWheelFrictionSettings(
int vehicleID,
int wheelIndex,
float asymptoteSlip,
float asymptoteValue,
float extremumSlip,
float extremumValue,
float stiffnessFactor );
346 void setSuspensionSettings(
int vehicleID,
int wheelIndex,
float damperAmt,
float springAmt,
float targetValue,
float suspensionTravel );
352 void setSound(
int vehicleID,
int soundEnumSection,
string soundFile );
353 void setVolume(
int vehicleID,
int soundEnumSection,
float volume );
354 void setPitch(
int vehicleID,
int soundEnumSection,
float pitch );
355 void setLength(
int vehicleID,
int soundEnumSection,
float length );
356 void setLooped(
int vehicleID,
int soundEnumSection,
int isLooped[0 or 1] );
370 void steerLeft(
int vehicleID,
int overrideSteering,
float steeringAngle );
381 void steerRight(
int vehicleID,
int overrideSteering,
float steeringAngle);
383 void handBrake(
int vehicleID,
float torque );
385 void applyForce(
int vehicleID,
float axizX,
float axizY,
float axizZ );
386 void applyForceAtPoint(
int vehicleID,
float axizX,
float axizY,
float axizZ,
float posX,
float posY,
float posZ );
415 void applyLocalForce(
int vehicleID,
float axizX,
float axizY,
float axizZ );
436 void applyLocalForceAtPoint(
int vehicleID,
float axizX,
float axizY,
float axizZ,
float posX,
float posY,
float posZ );
701 void followPath(
int vehicleID,
string pathName,
float throttle);
float getWheel_ContactPosition(int vehicleID, int wheelIndex)
Return the position of suspensionTravel between 0(not extended) and 1(fully extended).
void setPathAccuracy(int vehicleID, float accuracy)
Set the accuracy of the path to follow. Lower numbers make the distance to each node before trigger s...
void setAsPlayer(int vehicleID, int isPlayer[1 or 0])
void setWheelMesh(int vehicleID, string wheelMeshName)
void useAntiRoll(int vehicleID, int useAntiRoll[0 or 1])
void destroy(int vehicleID)
Destroy and cleanup a vehicle in the scene by the vehicle ID passed through this function You should ...
float getWheel_LongitudalImpulse(int vehicleID, int wheelIndex)
get the contact data of the specified wheel and retrieve the LongitudalImpulse value.
float3 getWheelGlobalPosition(int vehicleID, int wheelIndex)
void setLooped(int vehicleID, int soundEnumSection, int isLooped[0 or 1])
void setSteeringCoefMulti(int vehicleID, float coeff)
int getAutoMaxSteerEnabled(int vehicleID)
Gets whether the steering angle auto reduces based on speed.
void setTorqueCurveSlot(int vehicleID, int rpm, int torque)
void setNumberOfWheels(int vehicleID, int numWheels)
void followPathPosition(int vehicleID, float x, float y, float z)
Override the default path follow and enter your own point to move to. In order for this to take effec...
void setNoWheelsDownforce(int vehicleID, float downforce)
void createVehicle(string vehicleName, int sceneEntityID, float posX, float posY, float posZ, float rotW, float rotX, float rotY, float rotZ)
create a new scripted vehicle to work on. It will need setup with the correct functions.
void setNumOfChassis(int vehicleID, int chassisNum)
float getWheel_LateralImpulse(int vehicleID, int wheelIndex)
get the contact data of the specified wheel and retrieve the LateralImpulse value.
void setPathNodeIndex(int vehicleID, int nodeIndex)
Set the current node index the vehicle should head towards on the currently set path.
void useWheelParticle(int vehicleID, int wheelIndex, int useParticle[0 or 1])
void setMaxSpeed_KPH(int vehicleID, int maxSpeedKPH)
void setCustomDebugMaterial(int vehicleID, string customDebugMaterialName)
void setAngularDamping(int vehicleID, float damp)
void setDownforce(int vehicleID, float downforce)
int getNumOfChassis(int vehicleID)
int getMoveDirection(int vehicleID)
void setInverseWheelMass(int vehicleID, int wheelIndex, float amt)
float getWheel_LateralSlip(int vehicleID, int wheelIndex)
get the contact data of the specified wheel and retrieve the LateralSlip angle value.
void setLinearMomentum(int vehicleID, float x, float y, float z)
void setAntiRollAmount(int vehicleID, float antiRollAmt)
void setPitch(int vehicleID, int soundEnumSection, float pitch)
void applyLocalForceAtPoint(int vehicleID, float axizX, float axizY, float axizZ, float posX, float posY, float posZ)
Apply a local force at a particular point on the vehicle.
void steerRight(int vehicleID, int overrideSteering, float steeringAngle)
Calling this command will make the vehicle steer left either by the engine itself or a custom steer a...
float3 getWheelLocalPosition(int vehicleID, int wheelIndex)
void setMaxSpeed_MPH(int vehicleID, int maxSpeedMPH)
void setAngularMomentum(int vehicleID, float x, float y, float z)
int getVelocity(int vehicleID)
void steerLeft(int vehicleID, int overrideSteering, float steeringAngle)
Calling this command will make the vehicle steer left either by the engine itself or a custom steer a...
void setMaxSteeringAngle(int vehicleID, float angle)
float getWheel_ContactForce(int vehicleID, int wheelIndex)
Return the contact force data from the specified wheel.
void setAngularVelocity(int vehicleID, float x, float y, float z)
void addChassis(int vehicleID, int chassisIndex, float posXfloat posY, float posZ, float scaleX, float scaleY, float scaleZ)
void setVolume(int vehicleID, int soundEnumSection, float volume)
void setWheelParticlePosition(int vehicleID, int wheelIndex, float x, float y, float z)
void setLength(int vehicleID, int soundEnumSection, float length)
void applyForceAtPoint(int vehicleID, float axizX, float axizY, float axizZ, float posX, float posY, float posZ)
void setOrientation(int vehicleID, float rotW, float rotX, float rotY, float rotZ)
void setCurrentGear(int vehicleID, int gear)
void setMotorTorque(int vehicleID, int wheelIndex, float torque)
float getSteeringMulti(int vehicleID)
Set the multiplier between 1 and 0 to reduce the steering input. Useful for joysticks.
void addWheel(int vehicleID, int vehicleID, int wheelIndex, int driveWheel, int steerWheel, float posX, float posY, float posZ)
void setLinearVelocity(int vehicleID, float x, float y, float z)
string getFollowPathName(int vehicleID)
return the name of the path the vehicle is following
void applyLocalForce(int vehicleID, float axizX, float axizY, float axizZ)
Apply a local force to the center of the vehicle.
void setSound(int vehicleID, int soundEnumSection, string soundFile)
float3 getWheel_LongitudalDirection(int vehicleID, int wheelIndex)
get the contact data of the specified wheel and retrieve the LongitudalDirection
int isFollowingPath(int vehicleID)
return whether the vehicle is currently following a path.
void setNumberOfGears(int vehicleID, int numGears)
int getSpeed_Mph(int vehicleID)
void useSound(int vehicleID, int soundEnumSection, int useSound[0 or 1])
int getWheel_ContactGround(int vehicleID, int wheelIndex)
Get if the wheel specified is in contact with the ground and return a 1 or 0 boolean.
int isDestinationReached(int vehicleID)
Poll to check if the vehicle has reached its destination.
float3 getWheel_LateralDirection(int vehicleID, int wheelIndex)
get the contact data of the specified wheel and retrieve the LateralDirection
int getSpeed_Kph(int vehicleID)
Definition: LUA_API_States.h:28
void setGearRatio(int vehicleID, float gearRatio)
void setWheelRadius(int vehicleID, int wheelIndex, float radius)
float3 getWheel_ContactPoint(int vehicleID, int wheelIndex)
Get the point of contact with the floor and bottom of the wheel in world space.
void setAirResistance(int vehicleID, float baseValue, float multiplier)
int isPlayer(int vehicleID)
void setPathMaxTurn(int vehicleID, float maxTurn)
Set the maximum speed of the turning rate for this vehicle.
float getMaxBrakeForce(int vehicleID)
void setRPM(int vehicleID, int minRpmToGearDown, int maxRpmToGearUp, int minRpm, int maxRpm)
void setMass(int vehicleID, float mass)
void setPosition(int vehicleID, float posX, float posY, float posZ)
void useAirResistance(int vehicleID, int useResistance[0 or 1])
void enableAutoMaxSteer(int vehicleID, int state)
Sets the steering to auto adjust based on speed and reduce the steering angle.
void setWheelParticle(int vehicleID, int wheelIndex, string particleName)
void applyForce(int vehicleID, float axizX, float axizY, float axizZ)
void setPairDownforce(int vehicleID, float downforce)
void handBrake(int vehicleID, float torque)
vehicle getTagOffset(vehID, wheelID)
Get TAG offset.
void setWheelAsHandbrake(int vehicleID, int wheelIndex)
void accelerate(int vehicleID)
void setLinearDamping(int vehicleID, float damp)
string getWheelMesh(int vehicleID)
void setLatWheelFrictionStiffness(int vehicleID, int wheelIndex, float stiffnessFactor)
float getWheel_LongitudalSlip(int vehicleID, int wheelIndex)
get the contact data of the specified wheel and retrieve the LongitudalSlip angle value...
void setCurrentThrottle(int vehicleID, float throttle)
int getRPM(int vehicleID)
void setLongWheelFrictionStiffness(int vehicleID, int wheelIndex, float stiffnessFactor)
int getMaxSpeed_MPH(int vehicleID)
vehicle setTagOffset(vehID, wheelID, offset)
Set TAG offset.
int getNumOfWheels(int vehicleID)
void followPath(int vehicleID, string pathName, float throttle)
follow a path simply by calling this function in an update loop. The movement will automatically be s...
void decelerate(int vehicleID)
void showDebug(int vehicleID, int showDebug[0 or 1])
float getCurrentThrottle(int vehicleID)
int getVehicleID(int sceneEntityID, string vehicleName)
Get the ID of a vehicle by passing the scene entity ID and a vehicle Name.
void createPhyicsBody(int vehicleID)
void setLongWheelFrictionSettings(int vehicleID, int wheelIndex, float asymptoteSlip, float asymptoteValue, float extremumSlip, float extremumValue, float stiffnessFactor)
void setBrakeTorque(int vehicleID, int wheelIndex, float torque)
float3 getWheel_ContactNormal(int vehicleID, int wheelIndex)
Return the contact Normal from the specified wheel. This is the normal of the raycasted face...
void setCenterOfMass(int vehicleID, float offsetX, float offsetY, float offsetZ)
void setWheelParticleEnabled(int vehicleID, int wheelIndex, int isEnabled[0 or 1])
int getCurrentGear(int vehicleID)
int getMaxSpeed_KPH(int vehicleID)
void setSteeringMulti(int vehicleID, float multi)
Set the multiplier between 1 and 0 to reduce the steering input. Useful for joysticks.
void setLatWheelFrictionSettings(int vehicleID, int wheelIndex, float asymptoteSlip, float asymptoteValue, float extremumSlip, float extremumValue, float stiffnessFactor)
void setSuspensionSettings(int vehicleID, int wheelIndex, float damperAmt, float springAmt, float targetValue, float suspensionTravel)
Definition: LUA_API_Vehicle.h:211
float getWheelRadius(int vehicleID, int wheelIndex)
void createWheels(int vehicleID)