Wind resistance.

Blitz3D Forums/Blitz3D Programming/Wind resistance.

if you dont need it too accurate and you want different air friction in different directions, try this:

for a sail, where the x air resitance is very high, you would do this:
;relative friction
rXfriction# = 0.2
rYfriction# = 0.99
rZfriction# = 0.99

;loop
;entity is your sail, which gets rotated
tformvector rXfriction#,rYfriction#,rZfriction#,entity,0
wXfriction# = tformedx()
wYfriction# = tformedy()
wZfriction# = tformedz()

wXvel# = wXvel# * wXfriction#
wYvel# = wYvel# * wYfriction#
wZvel# = wZvel# * wZfriction#


variables prefixed with "r" are relative to the object, and those with "w" are world...