I have a problem that I can’t seem to fix. My AI chases the player around when in line of sight but it runs through walls to get to the player. Also, when the enemy is wondering, it goes through walls. Is there a script that someone could help me make/give to me that makes my AI detect a wall a slowly rotate to the angle where it can go around it? Any help will help a lot…Thanks!
Okay, the likely reason is that you’re simply adjusting the AI object’s transform directly, which doesn’t work for anything physic or collision based.
I’d look into a few things, including AI steering behaviors and path-finding, with A* being the best of them.
Also, for your AI objects, you should either give them a rigidbody and use rigidbody functions to move them around, or a CharacterController, which is a bit more advanced. However, there’s plenty of documentation for either.