Wind for cloth?

Hey, i have a chaacter with a cloak on hes back, and i noticed that the regular “Force Field” doesnt work in game engine.

Does anyone know any other trick to make teh cloth look like it blows in the wind? :smiley:

One idea is:


import random
import bge

def wind(cont):
    own = cont.owner
    #minimal wind strength
    minStrength = 5.0
    #maximal wind strength
    maxStrength = 15.0
    windFactor = random.uniform(minStrength, maxStrength)
    #apply force in any axis you need. You can also do -windFactor for negative axis.
    own.applyForce([0.0, windFactor, 0.0], False)

wind()

Run this script on your cloak and it will have kinda wind effect(I hope so). But I guess others can reccomend something better;)

You can also use applyImpulse, and generate random force points :smiley:

ty for the answears i will chekc them out :smiley: