Quantcast
Channel: Questions in topic: "ragdoll"
Viewing all articles
Browse latest Browse all 565

Whats the right way to have animations and a rag doll on the same NPC?

$
0
0
I have an NPC character, that I want to react properly to gunfire and as such have a full biped skeleton, animated, imported from 3dsmax, etc. When I just apply the ragdoll to the NPC, and map it, of course, as soon as the game starts, the player just collapses in a heap. No problem, I wrote a script that disables the ragdoll until the character is shot. That all works perfect. The NPC stands there and if I shoot it in the head, the head lolls back and pitches over, rag doll in effect. I decided to tie that in with the animations I have for that model (I can control the same model as a 3rd person) so that it can take aim at other players. As SOON as I hook the animator controller up, I can no longer affect ragdoll, or even target the NPC! Without the animator controller, when I target an object, I get "You clicked BIPLeftUpperArm" or whatever. With the animator controller, I get no such message. I tdoesn't even tdetect the clicks, let alone, cause a collision when the bullet enters. To disable this, I threw a spherical trigger on the NPC, that whenever a bullet enters the trigger, temporarily disables the animator controller. WOW, this causes an unbelievable effect, where the NPC sort of jumps about 10 feet into the air. I'm pretty certain the bullet itself has no effect on the ragdoll until it settles on the ground... I'm totally lost as to how to actually combine these two.

Viewing all articles
Browse latest Browse all 565


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>