Page tree
Skip to end of metadata
Go to start of metadata

 

Introduced in

Version:19.1.0

Description

Description:Adds a resistive force to a ground vehicle. Once added, the force is continuously applied against the motion of the vehicle, until removed.

Syntax

Syntax:

vehicle addResistiveForce [id, position, forceCoefficient, minForce, maxForce]

Parameters:
  • vehicle: Object - Vehicle to add force to. Only vehicles of type CarEPE and TankEPE are supported.
  • id: String - Unique ID of this force. Any subsequent calls to addResistiveForce with the same ID updates this force.
  • position: String OR Vector3D - Position on the vehicle at which to apply the force. Can be either a memory point name or model coordinates.
  • forceCoefficient: Vector3D - Defines coefficients that the resistive force is multiplied by in each local axis. Larger values create more resistance.
  • minForce: Vector3D - Defines the minimum amount of force that can be applied in each local axis. Negative values define the maximum force in the negative direction of the axis.
  • maxForce: Vector3D - Defines the maximum amount of force that can be applied in each local axis. Negative values define the minimum force in the negative direction of the axis.
Return Value:Nothing

Examples

Examples:
vehicle player addResistiveForce ["plowForce", [0, 3, 0], [2, 5, 0], [-200, -500, 0], [200, 200, 0]]

Additional Information

See also:removeResistiveForce
Multiplayer:Only takes affect, where the vehicle is local.