Sets force field resistance 0.0-1.0 (0.0=no resistance, 1.0=full resistance against movement).
Takes handle (force field handle from b3dCreateForceField), resistance (resistance factor 0.0-1.0, opposes movement against force direction).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
handleInt
resistanceDouble
Returns
Void
Quick Summary
Sets force field resistance 0.0-1.0 (0.0=no resistance, 1.0=full resistance against movement).
Takes handle (force field handle from b3dCreateForceField), resistance (resistance factor 0.0-1.0, opposes movement against force direction).
Returns nothing.
Technical Exegesis...
Sets force field resistance 0.0-1.0 (0.0=no resistance, 1.0=full resistance against movement). Takes handle (force field handle from b3dCreateForceField), resistance (resistance factor 0.0-1.0, opposes movement against force direction). Returns nothing. Sets ff.resistance clamped to 0.0-1.0, affects force application when character moves against field. Use for one-way forces, wind resistance, or asymmetric force fields.
This function sets force resistance.
Sets force field resistance 0.0-1.0 (0.0=no resistance, 1.0=full resistance against movement). Takes handle (force field handle from b3dCreateForceField), resistance (resistance factor 0.0-1.0, opposes movement against force direction). Returns nothing. Sets ff.resistance clamped to 0.0-1.0, affects force application when character moves against field. Use for one-way forces, wind resistance, or asymmetric force fields.
This function sets force resistance. Force field resistance: resistance opposes movement against force direction (creates asymmetric force, easier to move with force than against), 0.0 = no resistance (force applied equally regardless of movement direction, symmetric), 1.0 = full resistance (strong opposition when moving against force, one-way effect), intermediate values partial resistance (graduated opposition, moderate asymmetry). Use cases: (1) One-way wind (easy to move with wind, hard to move against), (2) Current effects (water or air current pushes one direction, resists opposite), (3) Force barriers (allows entry, prevents exit or vice versa), (4) Asymmetric hazards (different force based on approach direction), (5) Momentum gates (easy passage one way, blocked reverse). Common patterns: one-way wind b3dSetForceFieldResistance(windField, 0.8), water current b3dSetForceFieldResistance(currentField, 0.9), symmetric force b3dSetForceFieldResistance(field, 0.0). Typical usage: set once for desired asymmetry (configure one-way or symmetric behavior), adjust for gameplay mechanics (dynamic resistance based on state).
Resistance 0.0: no resistance (default, force applied equally all directions), symmetric force (same push whether moving with or against force), typical for explosions or gravity wells (radial forces treat all directions equally). Resistance 1.0: full resistance (maximum opposition against force direction), strong asymmetry (very hard to move against force, easy to move with), one-way barrier effect (force prevents reverse movement almost completely). Intermediate resistance: partial asymmetry (moderate opposition, some difficulty moving against force), resistance 0.5 moderate effect (noticeable but not overwhelming), balanced gameplay (challenge without frustration). One-way wind example: strong tailwind (b3dSetForceFieldResistance(tailwind, 0.9) hard to move against), character pushed forward easily (wind assists forward movement), difficult to walk backward (high resistance opposes reverse movement), asymmetric gameplay. Water current example: river current (b3dSetForceFieldResistance(riverCurrent, 0.85) strong one-way flow), swimming downstream easy (current assists, fast movement), swimming upstream hard (resistance opposes, slow difficult movement), realistic river physics. Force barrier entry: entry allowed exit blocked (b3dSetForceFieldResistance(entryBarrier, 1.0) one-way only), character enters easily (force direction inward, no resistance entering), character cannot exit (full resistance outward, blocked by force), access control gameplay. Resistance calculation: checks character movement relative to force (dot product of velocity and force direction), moving with force minimal resistance (force assists movement, low opposition), moving against force high resistance (force opposes movement, high opposition), perpendicular movement intermediate (partial resistance based on angle). Parameter clamping: resistance < 0.0 clamped to 0.0 (negative becomes zero, no negative resistance), resistance > 1.0 clamped to 1.0 (above 1 becomes max, full resistance limit), valid range 0.0-1.0 (ensures physical behavior). Resistance vs strength: strength defines force magnitude (how strong push or pull is, base force power), resistance defines asymmetry (how force varies with movement direction, directional behavior), independent properties (high strength low resistance = strong symmetric force, low strength high resistance = weak asymmetric force). Resistance persistence: resistance change immediate (takes effect next physics update), resistance remains until changed again (persistent, doesn't reset), field with new resistance until explicitly changed or deleted. Performance: O(1) operation (simple float assignment with clamping). Validation: silently returns if handle not found, clamps resistance to 0.0-1.0. Related: b3dCreateForceField creates force field (default resistance 0.0 symmetric), b3dSetPhysicsWindResistance sets character wind resistance (character property not field property), b3dPositionForceField moves force field (complementary to resistance), b3dRotateForceField orients force field (resistance relative to rotated direction).