Vehicle::setHandling: Difference between revisions

From RAGE Multiplayer Wiki
(Add information on certain handling.meta properties requiring some modification to work correctly as they do not directly map)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:


*'''fSteeringLock''' - handling.meta value * 0.017453292
*'''fSteeringLock''' - handling.meta value * 0.017453292
*'''fTractionCurveLateral''' - handling.meta  value * 0.017453292


*'''fTractionBiasFront''' - handling.meta value * 2
*'''fTractionBiasFront''' - handling.meta value * 2

Latest revision as of 16:14, 29 August 2020

You can find all list of the types here: https://forums.gta5-mods.com/topic/3842/tutorial-handling-meta

Notes

setHandling does not use the exact values from handling.meta for certain fields, these are as follows:

  • fInitialDriveMaxFlatVel - handling.meta value / 3.6
  • fBrakeBiasFront - handling.meta value * 2
  • fSteeringLock - handling.meta value * 0.017453292
  • fTractionCurveLateral - handling.meta value * 0.017453292
  • fTractionBiasFront - handling.meta value * 2
  • fSuspensionCompDamp - handling.meta value / 10
  • fSuspensionReboundDamp - handling.meta value / 10
  • fSuspensionBiasFront - handling.meta value * 2
  • fAntiRollBarBiasFront - handling.meta value * 2

Syntax

vehicle.setHandling(type, value);

Required Arguments

  • type: string
  • value: number/string

Return value

  • Undefined

Example

if (mp.players.local.vehicle) {
  mp.players.local.vehicle.setHandling("fMass", 3500);
  mp.players.local.vehicle.setHandling("fInitialDragCoeff", 4.77);
}

See also