b3dSetVehicleAngularVelocity

Sets vehicle angular velocity (rotation speed) directly. Takes vehicleHandle (vehicle from b3dCreateVehicle), vx/vy/vz (angular velocity in rad/sec around X/Y/Z axes). Returns nothing.

3D Graphics

Parameters & Returns

Parameters

vehicleHandle Int
vx Double
vy Double
vz Double

Returns

Void

Quick Summary

Sets vehicle angular velocity (rotation speed) directly. Takes vehicleHandle (vehicle from b3dCreateVehicle), vx/vy/vz (angular velocity in rad/sec around X/Y/Z axes). Returns nothing.

Technical Exegesis...

Sets vehicle angular velocity (rotation speed) directly. Takes vehicleHandle (vehicle created with b3dCreateVehicle and finalized), vx/vy/vz (angular velocity components in radians per second around world X/Y/Z axes). Returns nothing. Directly sets rotational velocity in Jolt physics body, causing immediate rotation speed change.

Example

Example.bam
; Stop vehicle rotation completely
b3dSetVehicleAngularVelocity(vehicle, 0.0, 0.0, 0.0)

; Create barrel roll effect (spin around Z-axis)
rollSpeed = 3.14  ; ~180 deg/sec
b3dSetVehicleAngularVelocity(vehicle, 0.0, 0.0, rollSpeed)