IEnumerator GetKnockBacked()
{
yield return null;
_agent.enabled = false;
_rigidbody.useGravity = true;
_rigidbody.isKinematic = false;
//add somehow detect getting kicked by player
yield return new WaitForFixedUpdate();
yield return new WaitForSeconds(0.5f);
_rigidbody.velocity = Vector3.zero;
_rigidbody.angularVelocity = Vector3.zero;
_rigidbody.useGravity = true;
_rigidbody.isKinematic = true;
_agent.Warp(transform.position);
_agent.enabled = true;
}
Hey folks, uber noob here, been wondering how to get my Nav agent to be able to get pushed (this is for the player’s kick) and wondering how I would get a detection through, kick is a hot box but i also have traps that have them to, but I don’t want the AI to turn off on a trap over and over again.