b3dSetVehicleWheelFriction

Configures wheel tire friction for lateral (cornering) and longitudinal (acceleration/braking) forces. Takes vehicleHandle (vehicle from b3dCreateVehicle), wheelIndex (wheel index from b3dAddVehicleWheel), lateralFriction (sideways tire friction affecting cornering), longitudinalFriction (forward/backward tire friction affecting acceleration/braking). Returns nothing.

3D Graphics

Parameters & Returns

Parameters

vehicleHandle Int
wheelIndex Int
lateralFriction Double
longitudinalFriction Double

Returns

Void

Quick Summary

Configures wheel tire friction for lateral (cornering) and longitudinal (acceleration/braking) forces. Takes vehicleHandle (vehicle from b3dCreateVehicle), wheelIndex (wheel index from b3dAddVehicleWheel), lateralFriction (sideways tire friction affecting cornering), longitudinalFriction (forward/backward tire friction affecting acceleration/braking). Returns nothing.

Technical Exegesis...

Configures wheel tire friction for lateral (cornering) and longitudinal (acceleration/braking) forces. Takes vehicleHandle (vehicle from b3dCreateVehicle), wheelIndex (0-based wheel index from b3dAddVehicleWheel), lateralFriction (tire friction coefficient for sideways forces, affects cornering grip, typical 0.8-2.0), longitudinalFriction (tire friction coefficient for forward/backward forces, affects acceleration and braking grip, typical 0.8-2.0). Returns nothing.

Example

Example.bam
; Normal road tires on all wheels
For i = 0 To 3
    b3dSetVehicleWheelFriction(vehicle, i, 1.0, 1.0)
Next

; Racing slicks for maximum grip
For i = 0 To 3
    b3dSetVehicleWheelFriction(raceCar, i, 1.8, 1.8)
Next

; Drift car (low lateral, normal longitudinal)
For i = 0 To 3
    b3dSetVehicleWheelFriction(driftCar, i, 0.5, 1.0)
Next

; Ice racing (very slippery)
For i = 0 To 3
    b3dSetVehicleWheelFriction(iceCar, i, 0.3, 0.3)
Next

; Front-grip, rear-drift setup
b3dSetVehicleWheelFriction(vehicle, 0, 1.2, 1.0)  ; Front-left
b3dSetVehicleWheelFriction(vehicle, 1, 1.2, 1.0)  ; Front-right
b3dSetVehicleWheelFriction(vehicle, 2, 0.6, 1.0)  ; Rear-left
b3dSetVehicleWheelFriction(vehicle, 3, 0.6, 1.0)  ; Rear-right