- Home /
How do I apply reactions to players/enemies?
I want to achieve a few things with respects to players reacting to sudden movement and pain and the like. I think switching the model to rag-doll for a second would work for a few of them (i.e. riding in a car, car hits bump, turret guy moves sideways a bit, or shooting an alien in the leg and then having him lose it for awhile.) I think I can get this to work aside from the part where I put them back in from limbo. If the movement depends upon the situation, how do I make them attempt to stand back up or snap into position again? Thanks, all who dare answer this, its tough.
Answer by spinaljack · May 26, 2010 at 03:26 AM
Simple answer: "you can't"
Complex answer: do a similar 100% ragdoll character to the Blurst Minotaur and set it's joint target angles to match that of a preanimated character on the fly.
Putting a character into ragdoll is easy, getting it back to animated is very hard as you don't know what position he'll be in. You could try to fudge it so that the character springs into a predefined position using spring joints but you still wouldn't get a perfect match with an animation and you'll notice a jump or pop back into animation mode.
darn. I guess the next step is to have no animations and just have my player try to gravitate towards a certain motion. but thats too hard. hooray for capsule-people!
Answer by parsed · Nov 07, 2012 at 08:06 PM
hooray for capsule-people! This is not a real solution.
Sorry to chip in so late. The answer is not correct. You can. Ragdoll to animation is done with dynamic animations. Basically you manually create curves from the current ragdoll pose, for all animated transforms, and target your desired position, which is normally a specific frame of an animation.
You can see that in action in the free version of URG, which you can access from our signature.
Answer by Kavorka · Feb 02, 2014 at 07:22 PM
Play around with this system AnimFollow
It will get you close, really close if you are skilled and can modify the ragdoll control script.
Your answer
![](https://koobas.hobune.stream/wayback/20220613025206im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Ragdoll behaving incorrectly when disabling animator component. 1 Answer
Smashing through walls 1 Answer
Help with Ragdoll Character Controller 1 Answer
Making characters strike poses when hit? 2 Answers
human character with ragdoll hair 2 Answers