Configures vehicle transmission clutch strength affecting power transfer.
Takes vehicleHandle (vehicle from b3dCreateVehicle), clutchStrength (0-1, how strongly engine couples to wheels).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
vehicleHandleInt
clutchStrengthDouble
Returns
Void
Quick Summary
Configures vehicle transmission clutch strength affecting power transfer.
Takes vehicleHandle (vehicle from b3dCreateVehicle), clutchStrength (0-1, how strongly engine couples to wheels).
Returns nothing.
Technical Exegesis...
Configures vehicle transmission clutch strength affecting power transfer from engine to wheels. Takes vehicleHandle (vehicle created with b3dCreateVehicle), clutchStrength (0 to 1 where 0=no coupling/slipping, 0.5=moderate coupling, 1=strong coupling/locked). Returns nothing. Sets Jolt WheeledVehicle transmission parameters affecting how engine torque transfers to wheels and how quickly engine RPM matches wheel speed.
This function configures transmission.
Configures vehicle transmission clutch strength affecting power transfer from engine to wheels. Takes vehicleHandle (vehicle created with b3dCreateVehicle), clutchStrength (0 to 1 where 0=no coupling/slipping, 0.5=moderate coupling, 1=strong coupling/locked). Returns nothing. Sets Jolt WheeledVehicle transmission parameters affecting how engine torque transfers to wheels and how quickly engine RPM matches wheel speed.
This function configures transmission. Clutch parameters: vehicleHandle (vehicle handle from b3dCreateVehicle), clutchStrength (clutch coupling strength 0-1, determines how tightly engine connects to wheels, higher = stronger connection, lower = more slip). Clutch behavior: clutchStrength affects power transfer efficiency (low strength = engine can spin faster than wheels, power loss through clutch slip, high strength = engine RPM closely matches wheel speed, efficient power transfer), affects acceleration response (low strength = smooth gradual acceleration, engine revs freely, high strength = instant power delivery, aggressive acceleration), affects stalling (low strength = less likely to stall at low speed, engine and wheels can have different speeds, high strength = more realistic stalling behavior, engine locked to wheels).
Clutch strength values: 0.0 = no clutch (complete slip, engine disconnected from wheels, vehicle doesn't move regardless of throttle, not typical for normal use), 0.3 = weak clutch (smooth acceleration, significant slip, forgiving for beginners, low power transfer efficiency), 0.5 = moderate clutch (balanced between smoothness and power, typical default value, good compromise for arcade gameplay), 0.7 = strong clutch (responsive acceleration, minimal slip, more realistic feel, good for simulation), 1.0 = locked clutch (maximum coupling, no slip, instant power transfer, very responsive but less forgiving).
Transmission and acceleration: low clutch strength (0.3-0.4) allows engine to rev up quickly (engine RPM increases faster than wheel speed, creates turbo/supercharger feel, smoother but slower acceleration), high clutch strength (0.7-1.0) locks engine to wheels (engine RPM directly tied to wheel speed, immediate power delivery, faster acceleration if engine has power). Clutch and RPM: weak clutch allows RPM mismatch (engine at 4000 RPM while wheels only spinning at 2000 RPM equivalent, slip absorbs difference), strong clutch forces RPM match (engine RPM = wheel angular velocity * differential ratio * 60 / (2π), less slip, more efficient).
Use cases: (1) Arcade racing (moderate to high clutch 0.5-0.7 for responsive feel), (2) Simulation racing (high clutch 0.7-0.9 for realistic power transfer), (3) Beginner-friendly (low clutch 0.3-0.5 for forgiving smooth acceleration), (4) Off-road driving (moderate clutch 0.5-0.6 for controlled power on loose terrain), (5) Drag racing (very high clutch 0.9-1.0 for maximum power transfer). Common patterns: balanced car (clutchStrength 0.5), responsive sports car (clutchStrength 0.7-0.8), smooth luxury car (clutchStrength 0.4-0.5), aggressive race car (clutchStrength 0.8-1.0).
Clutch and engine torque: clutch strength multiplies effective torque transfer (if engine produces 400 Nm and clutchStrength=0.5, effective torque to wheels ≈ 200 Nm through slip, if clutchStrength=1.0, full 400 Nm reaches wheels with no loss), lower clutch strength requires more throttle for same acceleration (compensates for slip, adjust maxTorque or clutchStrength to achieve desired feel). Clutch and wheel spin: high clutch strength can cause wheel spin on low friction (full engine power reaches wheels, overwhelms tire grip, wheels spin and lose traction), low clutch strength reduces wheel spin (power limited by clutch slip, acts as natural traction control).
Default behavior: if b3dSetVehicleTransmission not called (default clutchStrength likely 0.5, moderate balanced setting), vehicle works with defaults (no explicit transmission configuration needed, but recommended for tuning). Typical workflow: create vehicle (b3dCreateVehicle), configure engine (b3dSetVehicleEngine), configure transmission (b3dSetVehicleTransmission, optional for custom clutch strength), add wheels and differentials, finalize vehicle (b3dFinalizeVehicle).
Clutch physics: in real vehicles clutch connects/disconnects engine from transmission (allows gear changes, prevents stalling at stops), in BambooBasic simplified model (clutchStrength represents overall coupling, no explicit gear shifts unless scripted manually, clutch affects slip between engine and wheels). Simulation vs arcade: simulation (higher clutchStrength 0.7-0.9 for realistic behavior, requires skill to manage throttle), arcade (moderate clutchStrength 0.5-0.6 for forgiving fun gameplay, easier to control).
Tuning tips: if vehicle feels sluggish (increase clutchStrength for better power transfer, or increase engine maxTorque), if vehicle spins wheels too easily (decrease clutchStrength to reduce power transfer, or decrease engine maxTorque, or increase wheel friction), if acceleration too harsh (decrease clutchStrength for smoother power delivery), if acceleration too smooth/slow (increase clutchStrength for more aggressive response). Clutch and differential: clutch affects overall power transfer efficiency (before differentials, engine → clutch → differential → wheels), differentials split power left/right (clutch doesn't affect differential behavior directly).
Performance: O(1) operation (sets Jolt transmission parameter, no per-frame cost), clutch applied during physics step (integrated into power transfer calculation, minimal overhead). Validation: silently returns if vehicleHandle invalid (vehicle not found in g_vehicleHandles), no validation on clutchStrength value (negative or > 1.0 values allowed but not meaningful, clamp to 0-1 for expected behavior).
Related: b3dCreateVehicle creates vehicle body (call before configuring transmission), b3dSetVehicleEngine sets engine torque (clutch strength affects how engine torque transfers to wheels), b3dAddVehicleDifferential sets differential ratios (power flows from engine through clutch through differential to wheels), b3dFinalizeVehicle activates vehicle (call after transmission configuration), b3dSetVehicleInput controls throttle (throttle input controls how much engine power attempts to transfer through clutch).
Electric vehicle: electric vehicles typically have no clutch (direct drive from motor to wheels), use clutchStrength = 1.0 for electric simulation (locked transmission, instant power delivery, mimics direct drive characteristics), or script variable clutch (adjust clutchStrength based on speed for realistic electric power curve).
Example
Example.bam
; Standard car with balanced transmission
vehicle = b3dCreateVehicle(carMesh, 1500.0, 0.3, 0.5, 2.0, 0.6, 0.0)
; ... add wheels ...
b3dSetVehicleEngine(vehicle, 400.0, 1000.0, 6000.0)
b3dSetVehicleTransmission(vehicle, 0.5) ; Balanced clutch
; Sports car with strong clutch (responsive)
b3dSetVehicleTransmission(sportsCar, 0.75)
; Beginner car with weak clutch (forgiving)
b3dSetVehicleTransmission(beginnerCar, 0.35)
; Race car with very strong clutch (maximum power)
b3dSetVehicleTransmission(raceCar, 0.9)
; Electric vehicle with locked transmission (no slip)
b3dSetVehicleTransmission(electricCar, 1.0)