I have some gameobjects which have character controllers, basically I want to explode them, and shoot them up into the air.. typically i'd use rigidbody .AddForce and .AddTorque, these wont work however due to the attached CharacterController, so what i tried to do was detach that then do it, the problem is that when they gameobject is 'dead', it should become a trigger so that I may walk through it, so here is a series of events that must occure in some order to disable character controller, use rigid body for physics, when the enemy hits the ground, make static, turn off gravity(or just disable rigid-body completely) and set collider to trigger;
however its easier said then done, because when I try this, I run into issues such as, removing character controller, then trying to use the rigid body.. just barely has an effect, before ever having a character controller AddForce(0,10,0) worked fine, now after removing the charactercontroller it just barely nudges the object.. then of course there is no good quick way to disable the rigid body after he hits the ground, without some hard-coded script; all in all, the main issue where AddForce now hardly has any effect right after moving the charactercontroller(in the same frame) and im unsure if that has something to do with it.. I did notice that after the first frame, it suddenly works well enough
asked Jul 25 '12 at 01:58 AM
switch your enemy with his fbx with a common rigidbody instead CharacterController, when hitted ,
maybe yield 0.5 second, then do what you need.
answered Jul 25 '12 at 03:18 AM