Chapter 2 · Examples

2.2Wind

w = Wind pos:[0,-200,80] strength:1.0 decay:0.0 turbulence:0.3 frequency:2.0
w.rotation = eulerAngles 90 0 0
addModifier $ (Tnpix_Forces())
append $.modifiers[#Tnpix_Forces].forceNodes w
append $.modifiers[#Tnpix_Forces].forceMuted 0      -- 0 = acting, 1 = muted

What you should see: nothing while stopped: forces act during the simulation. Play and the cloth leans and ripples away from the wind. Rotate the Wind and play again: the cloth follows the new direction. Set $.modifiers[#Tnpix_Forces].forceMuted[1] = 1 and the wind stops acting on the cloth; the warp stays in the scene.

Pass decay:0.0 when you create a Wind by script. A Wind made in the interface starts with Decay, Turbulence and Frequency at 0; made from MAXScript they start at 1.0, and with Decay at 1.0 the push dies off within a few units of the warp.