Applies external torque to vehicle body for rotational forces.
Takes vehicleHandle (vehicle from b3dCreateVehicle), torqueX/torqueY/torqueZ (torque vector in Nm around X/Y/Z axes).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
vehicleHandleInt
torqueXDouble
torqueYDouble
torqueZDouble
Returns
Void
Quick Summary
Applies external torque to vehicle body for rotational forces.
Takes vehicleHandle (vehicle from b3dCreateVehicle), torqueX/torqueY/torqueZ (torque vector in Nm around X/Y/Z axes).
Returns nothing.
Technical Exegesis...
Applies external torque to vehicle body for rotational forces. Takes vehicleHandle (vehicle created with b3dCreateVehicle and finalized), torqueX/torqueY/torqueZ (torque components in Newton-meters around world X/Y/Z axes, causing rotation). Returns nothing. Adds rotational force to Jolt vehicle physics body, causing vehicle to spin or flip.
Applies external torque to vehicle body for rotational forces. Takes vehicleHandle (vehicle created with b3dCreateVehicle and finalized), torqueX/torqueY/torqueZ (torque components in Newton-meters around world X/Y/Z axes, causing rotation). Returns nothing. Adds rotational force to Jolt vehicle physics body, causing vehicle to spin or flip.
Torque components: torqueX (rotation around X-axis, pitch forward/backward, positive = nose down, negative = nose up), torqueY (rotation around Y-axis, yaw left/right, positive = turn right, negative = turn left), torqueZ (rotation around Z-axis, roll left/right, positive = roll right, negative = roll left). Use cases: (1) Flip vehicle after landing (apply torque to rotate vehicle upright), (2) Explosion effects (apply torque to spin vehicle from blast), (3) Special abilities (boost with rotation for stunts), (4) Wind effects (crosswind applies yaw torque).
Torque vs impulse: torque causes continuous rotation (applied each frame accumulates angular velocity), impulse causes instant rotation change (one-time rotational kick), use torque for forces over time (wind, engine effects), use impulse for instant events (collisions, jumps). Coordinate system: torqueX/Y/Z in world space (not local to vehicle), positive torques follow right-hand rule (curl fingers in rotation direction, thumb points along axis).