Sets persistent wind force for character (x,y,z in units/sec^2, scaled by wind resistance).
Takes characterHandle (character controller from b3dCreateCharacterController), x (wind force X component in units per second squared, east-west wind), y (wind force Y component in units per second squared, vertical wind), z (wind force Z component in units per second squared, north-south wind).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
characterHandleInt
xDouble
yDouble
zDouble
Returns
Void
Quick Summary
Sets persistent wind force for character (x,y,z in units/sec^2, scaled by wind resistance).
Takes characterHandle (character controller from b3dCreateCharacterController), x (wind force X component in units per second squared, east-west wind), y (wind force Y component in units per second squared, vertical wind), z (wind force Z component in units per second squared, north-south wind).
Returns nothing.
Technical Exegesis...
Sets persistent wind force for character (x,y,z in units/sec^2, scaled by wind resistance). Takes characterHandle (character controller from b3dCreateCharacterController), x (wind force X component in units per second squared, east-west wind), y (wind force Y component in units per second squared, vertical wind), z (wind force Z component in units per second squared, north-south wind). Returns nothing. Sets data.windForce, applied continuously during physics updates.
Sets persistent wind force for character (x,y,z in units/sec^2, scaled by wind resistance). Takes characterHandle (character controller from b3dCreateCharacterController), x (wind force X component in units per second squared, east-west wind), y (wind force Y component in units per second squared, vertical wind), z (wind force Z component in units per second squared, north-south wind). Returns nothing. Sets data.windForce, applied continuously during physics updates. Use for environmental wind zones, weather effects, or persistent directional forces.
This function sets wind force. Wind force system: stores wind vector in data.windForce (persistent force, not cleared after one frame), applied during UpdatePhysicsSystem (wind added to velocity continuously, every physics frame), scaled by wind resistance (effective wind = windForce * (1.0 - windResistance), allows per-character customization). Wind parameters: x = horizontal east-west wind (positive = wind blows east, negative = wind blows west, units/sec^2 acceleration), y = vertical up-down wind (positive = wind blows up, negative = wind blows down, units/sec^2 acceleration), z = horizontal north-south wind (positive = wind blows north, negative = wind blows south, units/sec^2 acceleration), wind vector (x, y, z) form 3D wind direction and strength. Use cases: (1) Wind zones (consistent wind in outdoor areas or wind tunnels), (2) Weather effects (dynamic wind from storm or wind patterns), (3) Updrafts (vertical wind for gliding or flying sections), (4) Directional forces (wind pushing character toward or away from objectives), (5) Environmental storytelling (wind direction hints at danger or path). Common patterns: horizontal wind b3dSetPhysicsWind(char, windX, 0, windZ) typical outdoor wind, updraft b3dSetPhysicsWind(char, 0, 5.0, 0) vertical wind lift, clear wind b3dSetPhysicsWind(char, 0, 0, 0) remove wind force. Typical usage: set when entering wind zone (configure wind as character enters area), clear when leaving zone (set to zero when exiting wind area), update dynamically for weather (change wind strength and direction over time).
Wind force vs custom force: wind force is persistent (remains until explicitly changed, not cleared each frame), custom force (b3dApplyCharacterForce) is single-frame or replaced (typically cleared or replaced each frame), both applied simultaneously (wind + custom force + gravity = total acceleration), use wind for persistent environmental forces (weather, zones, constant push). Wind force application: applied during UpdatePhysicsSystem (integrated into velocity each frame, velocity += windForce * windResistance * deltaTime), continuous acceleration (wind builds velocity over time, persistent push), affected by wind resistance (character-specific wind sensitivity, default 1.0 = full wind effect). Wind resistance scaling: effective wind = windForce * (1.0 - windResistance) (wind resistance reduces wind effect), windResistance 0.0 = full wind (character fully affected, maximum push), windResistance 1.0 = no wind (character immune to wind, zero effect), allows per-character customization (heavy characters high resistance, light characters low resistance). Horizontal wind example: outdoor wind zone (windForce = (5.0, 0, 0) eastward wind), set on zone entry (b3dSetPhysicsWind(char, 5.0, 0, 0) when entering zone), character pushed east (continuous eastward acceleration, builds velocity over time), clear on exit (b3dSetPhysicsWind(char, 0, 0, 0) when leaving zone). Updraft example: gliding section (updraft = (0, 8.0, 0) strong upward wind), set during glide (b3dSetPhysicsWind(char, 0, 8.0, 0) when gliding activated), character lifted upward (vertical wind counters gravity, extends air time), clear on landing (b3dSetPhysicsWind(char, 0, 0, 0) when grounded). Wind tunnel example: wind tunnel force (windForce = (0, 0, 15.0) strong forward push), set in tunnel (b3dSetPhysicsWind(char, 0, 0, 15.0) inside wind tunnel zone), character pushed forward (strong forward acceleration, hard to resist), clear outside tunnel (b3dSetPhysicsWind(char, 0, 0, 0) when exiting). Dynamic weather wind: calculate wind from weather (windStrength = stormIntensity * maxWind, windDir from storm direction), update wind each frame (windVec = windDir * windStrength, b3dSetPhysicsWind(char, windVec.X, 0, windVec.Z)), dynamic weather feel (wind changes with storm intensity and direction). Diagonal wind: wind vector at angle (windForce = (3.0, 0, 3.0) northeast wind, 45 degrees angle), set diagonal wind (b3dSetPhysicsWind(char, 3.0, 0, 3.0) northeast push), character pushed northeast (both X and Z components applied, realistic diagonal wind). Wind magnitude: small wind 1-5 units/sec^2 (gentle breeze, subtle push, environmental ambience), medium wind 5-15 units/sec^2 (moderate wind, noticeable push, affects movement), strong wind 15-30+ units/sec^2 (powerful wind, significant push, hard to resist), extreme wind 50+ units/sec^2 (hurricane-force, overwhelming push, dramatic effect). Wind direction: wind vector points in push direction (positive X = push east, positive Y = push up, positive Z = push north), wind magnitude is vector length (magnitude = sqrt(x^2 + y^2 + z^2), wind strength), normalize for constant magnitude (divide by length then scale by desired strength). Zero wind: wind (0, 0, 0) clears wind force (no wind applied, character moves normally), call to stop wind effects (exit wind zone, calm weather, wind turned off), character returns to normal movement (only gravity and input affect velocity). Negative wind: negative components reverse direction (negative x = push west, negative y = push down, negative z = push south), creates opposing winds (headwind vs tailwind, upward vs downward), directional variety (wind can blow any direction based on sign). Wind persistence: wind remains until explicitly changed (persistent across frames, not auto-cleared), set once per zone (configure wind on zone entry, remains until zone exit), update for dynamic effects (change wind strength or direction over time for weather). Multiple characters: each character has independent wind (set wind per character separately), different wind zones (character A in calm zone wind 0, character B in windy zone wind 10), per-character wind allows mixed environments (some characters in wind, others not). Wind vs gravity: wind adds to gravity (both applied simultaneously, wind + gravity = total acceleration), can counteract gravity (upward wind offsets downward gravity, creates floating or gliding), independent systems (gravity from gravityScale, wind from this function, both affect velocity). Wind vs input movement: wind adds to player input (both applied, wind + input = total velocity), can assist input (tailwind speeds movement, favorable direction), can resist input (headwind slows movement, player must overcome wind). Wind accumulation: wind applied each frame builds velocity (velocity += wind * deltaTime, repeated application accelerates character), longer wind exposure = higher velocity (persistent wind gradually speeds character up), wind strength determines acceleration rate (higher wind = faster velocity gain). Coordinate system: x horizontal east-west (positive = wind blows east, negative = wind blows west), y vertical up-down (positive = wind blows up, negative = wind blows down), z horizontal north-south (positive = wind blows north, negative = wind blows south). Wind force recommendations: gentle ambience 1-3 units/sec^2 (subtle environmental wind, barely noticeable), moderate gameplay 5-10 units/sec^2 (affects movement clearly, player adapts to wind), strong challenge 15-25 units/sec^2 (significant impediment or assist, gameplay mechanic), extreme effect 30+ units/sec^2 (overwhelming force, dramatic gameplay moment). Wind zones: check character position each frame (zone = GetWindZone(charPos)), set wind based on zone (If zone = windyArea Then windForce = (10, 0, 0) Else windForce = (0, 0, 0)), dynamic zoning (wind changes as character moves between areas), seamless transitions (smooth wind change when crossing zone boundaries). Wind visual effects: spawn particle effects based on wind (particleVelocity = windForce for wind direction), wind sound intensity (volumeWind = windMagnitude / maxWind for audio), visual feedback (leaves or dust blown by wind, directional indicators). Performance: O(1) operation (simple vector assignment, instant), no computation required (wind stored for later application during physics), safe to call every frame (though typically set per zone or weather change). Validation: silently returns if characterHandle not found (invalid or freed character), no wind validation (any values allowed including zero or extreme), no error messages (silent failure for performance). Related: b3dSetPhysicsWindResistance sets wind resistance (scales wind effect per character), b3dApplyCharacterForce applies single-frame custom force (complementary system), b3dSetPhysicsGravity sets global gravity (another environmental force), b3dSetCharacterGravityScale scales gravity (similar to wind resistance for gravity).