Configures wheel steering with maximum steer angle in degrees.
Takes vehicleHandle (vehicle from b3dCreateVehicle), wheelIndex (wheel index from b3dAddVehicleWheel), maxSteerAngle (maximum steering angle in degrees, typically 30-45).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
vehicleHandleInt
wheelIndexInt
maxSteerAngleDouble
Returns
Void
Quick Summary
Configures wheel steering with maximum steer angle in degrees.
Takes vehicleHandle (vehicle from b3dCreateVehicle), wheelIndex (wheel index from b3dAddVehicleWheel), maxSteerAngle (maximum steering angle in degrees, typically 30-45).
Returns nothing.
Technical Exegesis...
Configures wheel steering with maximum steer angle in degrees. Takes vehicleHandle (vehicle created with b3dCreateVehicle), wheelIndex (0-based wheel index from b3dAddVehicleWheel), maxSteerAngle (maximum steering angle in degrees, positive = can steer, 0 = no steering). Returns nothing. Sets wheel steering capability in Jolt WheeledVehicle, determines how much wheel turns when b3dSetVehicleInput called with right input.
Configures wheel steering with maximum steer angle in degrees. Takes vehicleHandle (vehicle created with b3dCreateVehicle), wheelIndex (0-based wheel index from b3dAddVehicleWheel), maxSteerAngle (maximum steering angle in degrees, positive = can steer, 0 = no steering). Returns nothing. Sets wheel steering capability in Jolt WheeledVehicle, determines how much wheel turns when b3dSetVehicleInput called with right input. Typically applied to front wheels only for standard car steering, but can be applied to any wheel for custom configurations.
This function enables steering. Parameters: vehicleHandle (vehicle handle from b3dCreateVehicle), wheelIndex (wheel index from b3dAddVehicleWheel, typically 0 and 1 for front-left and front-right, rear wheels typically not steered), maxSteerAngle (maximum steering angle in degrees, typical car 30-45 degrees, larger angles allow sharper turns but less realistic, 0 disables steering for this wheel). Steering behavior: when b3dSetVehicleInput called with right != 0 (right = 1.0 turns wheel to +maxSteerAngle right, right = -1.0 turns wheel to -maxSteerAngle left, right = 0.5 turns wheel to +maxSteerAngle/2, intermediate values interpolate linearly), Ackermann steering automatically applied (inside wheel turns sharper than outside wheel for proper cornering, Jolt handles geometry).
Typical steering configurations: standard car (front-left and front-right wheels steered, maxSteerAngle 30-40 degrees, rear wheels not steered, maxSteerAngle 0 or not configured), 4-wheel steering (front wheels primary steering 35-45 degrees, rear wheels subtle steering 5-15 degrees opposite direction for agility or same direction for high-speed stability, enhances maneuverability), forklift/tank (all wheels steered, tight turning radius, unusual configurations possible). MaxSteerAngle values: compact car (35-45 degrees for tight turning radius, easy parking), sedan (30-38 degrees balanced turning), sports car (25-35 degrees responsive but stable, high-speed stability), truck (20-30 degrees wide turning radius, prevents tip-over), race car (20-30 degrees precision steering, high-speed stability critical).
Steering and speed: steering angle doesn't automatically reduce at high speed (application must script speed-sensitive steering if desired, reduce effective maxSteerAngle as speed increases for realism), steering effectiveness naturally reduced at high speed (tire slip increases, physics simulation handles, less responsive turning at 100 mph vs 20 mph). Steering and tire friction: maxSteerAngle determines how far wheel can turn (doesn't guarantee vehicle turns that sharply, tire friction limits actual turn radius, excessive steering angle at high speed causes sliding/drifting), configure tire friction with b3dSetVehicleWheelFriction (lateral friction affects cornering grip).
Use cases: (1) Standard car steering (front wheels only, 30-40 degrees), (2) Tight turning vehicle (high maxSteerAngle 45-50 degrees, go-kart/forklift), (3) Stable high-speed vehicle (low maxSteerAngle 25-30 degrees, race car), (4) 4-wheel steering (front 35 degrees, rear 10 degrees, advanced handling), (5) Non-steered wheels (maxSteerAngle 0, rear wheels of standard car). Common patterns: front-left wheel (b3dSetVehicleWheelSteering(vehicle, 0, 35)), front-right wheel (b3dSetVehicleWheelSteering(vehicle, 1, 35)), rear wheels (not called or maxSteerAngle = 0).
Wheel indexing: wheelIndex from b3dAddVehicleWheel return value (0-based incremental, first wheel = 0, second = 1, etc), typical 4-wheel car (wheel 0 = front-left, wheel 1 = front-right, wheel 2 = rear-left, wheel 3 = rear-right), configure steering on indices 0 and 1 for front steering. Ackermann steering: inner wheel turns sharper than outer wheel (prevents tire scrubbing in turns, Jolt calculates geometry automatically, both front wheels turn but at slightly different angles), steering axis typically vertical (wheel rotates around Y-axis for left/right steering).
Speed-sensitive steering scripting: script reduces maxSteerAngle at high speed (speed = b3dGetVehicleSpeed, if speed > 50 then effectiveAngle = maxSteerAngle * 0.5, call b3dSetVehicleWheelSteering each frame with effectiveAngle, or adjust right input instead, right = rawRight * speedFactor), prevents excessive turning at high speed (improves realism and stability). Steering rate: maxSteerAngle is maximum angle (instant steering to full angle with right = 1.0, no rate limiting by default), script steering rate limiting (interpolate currentAngle toward targetAngle = right * maxSteerAngle, currentAngle = currentAngle * 0.9 + targetAngle * 0.1, smoother more realistic steering).
Front vs rear steering: front wheels primary steering (larger maxSteerAngle 30-45 degrees, controls direction), rear wheels optional steering (smaller maxSteerAngle 5-15 degrees, enhances maneuverability, same direction = crab walk, opposite direction = tighter turns). Rear-wheel steering modes: opposite direction (rear turns opposite to front, tighter turning circle, better low-speed maneuverability), same direction (rear turns same as front, better high-speed stability, lane change agility), script based on speed (low speed = opposite, high speed = same direction).
Performance: O(1) operation (sets Jolt wheel steering parameter, no per-frame cost), steering applied during physics step (wheel orientation updated based on input, integrated into tire force calculation, minimal overhead). Validation: silently returns if vehicleHandle invalid (vehicle not found in g_vehicleHandles), silently returns if wheelIndex out of bounds (must match wheel added with b3dAddVehicleWheel), no validation on maxSteerAngle (negative or extreme values allowed but may cause unexpected behavior, use positive reasonable values).
Related: b3dCreateVehicle creates vehicle body (call before configuring steering), b3dAddVehicleWheel adds wheels (returns wheelIndex for use with this function), b3dSetVehicleInput controls steering (right input -1 to 1 determines steering angle up to ±maxSteerAngle), b3dFinalizeVehicle activates vehicle (call after steering configuration), b3dSetVehicleWheelFriction sets tire friction (lateral friction affects how well steering translates to turning).
Typical values: compact car (35-45 degrees), sedan (30-38 degrees), SUV (28-35 degrees), sports car (25-32 degrees), truck (20-28 degrees), race car (20-30 degrees), go-kart (40-50 degrees), forklift (45-60 degrees).