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

Ignore past forces when isKinematic is set to false

$
0
0
My ragdoll seem to be affected by affected by the forces that were there before I actually activate it. I have a number of characters controlled by an animator for most of the game, until, at some point they die. When it happens I deactivate the animator, and set their ragdoll.isKinematic to false. I'd like them to slowly and 'elegantly' fall down, but instead they get thrown violently across the scene. I understand this is a common problem (I could not find a solution to), and it seems to be related to how forces keep getting applied to the ragdoll, and when isKinematic is deactivated, they just act on the ragdoll all at the same time. Which makes sense, because if I activate my "Death" function as soon as I start the game up, they fall down nicely, exactly the way I'd like them to. Any suggestion would be appreciated. I have already tried deactivating detectCollision until the ragdoll is activated, to call the ResetInertiaTensor function and to set all CollisionDetection to Continuous Dynamic, but they don't seem to do anything or (in the case of changing the collisionDetection anddetectCollision) make things worse. Here's my "death" function, for reference, where "boneRig" is the Component array of all the rigidbody components in the object. public void Death() { GetComponent().enabled = false; foreach (Rigidbody ragdoll in boneRig) { ragdoll.isKinematic = false; } }

Viewing all articles
Browse latest Browse all 565

Trending Articles



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