- Home /
AI follow and crash into Player
I am trying to create a simple enemy AI, and I just can't seem to find a good explanation. What I want to do is have the enemy follow and crash into the player, and when it does I want to destroy the player and have the AI move backwards for 3 seconds. The first is issue is following, I've seen people use transform.Translate, but my AI has a rigidBody so when they do collided they overlap and it gets ugly. When I try to use addForce, the enemy rolls around(its s cube) and floats away. The second issue is I'm not sure what collision function I should be using to detect when a Character Controller and a rigidBody collide.
And hell lets make this a little harder, could you please respond with javascript, I'm not smart enough to work with C# yet.
Thanks