- Home /
Give Ragdoll a trajectory and speed etc..
Hi All..
I got some problems; I got a car hitting zombies, and once their hit, they turn into ragdolls. I'd like those ragdolls to fly away more accurately, or even be able to control wich way they fly and how hard.. How do I go about it, can I make a function that, immediately after creating the ragdoll, gives it a short burst into a certain direction, and then let physics do the rest? If so, can you show an example bit of code that does the trick?
Thanks in advance! Thomas
Answer by Chris D · Jul 26, 2011 at 05:36 PM
Take a look through the scripting reference here. The addForce (and addRelativeForce, etc) functions should take care of what you're after.
To get the effect you want, just after the conversion to ragdoll, apply the force you decide on.
Ahh cool, exactly what I was looking for! Thanks for anwsering a n00bie that quickly bro!