Hi
I'm having fun making my first non-tutorial game with a Knight and Dragon. I would like to have the Dragon's fire particles to damage to the Knight and to have the tip of the tail do damage. I have the Knight built with a CharacterController and custom script;
Right now when the dragon breathes fire the particles collide with the Knight and jet propel the dragon backwards.
I understand that this is because the Character controller does not respond as a rigid body would. Is there a practical way around this? This is what I tried in the script that controls my knight. Flame hit is declared as a boolean false at the top of the script.
function OnParticleCollision(){
FlameHit = true;
}
and as part of function Update I have:
if(FlameHit == true){
var Knight : GameObject;
Knight = gameObject.Find("Knight6");
Knight.animation.Play("jump");
Knight.transform.Translate(0,5,-15);
FlameHit = false;
PlayerDamage++;
}
if(PlayerDamage>10){
Knight.animation.Play("dead");
}
It all works except that the Dragon also is rocketed backwards.