why My Enemy's half body is sinking into terrain it moves towards me? and it also starts looking in upward direction instead of looking straight towards my player camera


here’s the picture i hope it’s makes my problem clear to you , please someone help i’m a nowbie

okay so it’s been a year and since nobody cared to help so i’m answering it myself so that someday it might help a newbie(student) like me
The answer is to select your enemy then in the inspector go to addcomponent and add the navmeshagent .After that from the window on the top go to navigation and then click bake to bake the scene .