first of all, im a beginner so im sorry if my code is a huge mess. id like to know why my enemy is going its path even tho im making him chase me. so pretty much i want him to chase me and ignore his path, and if hes not chasing me to go again on his path. how would i do that? and also any tips are highly appreciated.
Since you previously set the destination of the NavMeshAgent, it doesn’t matter what you do with your canWander
variable, it will continue to navigate to that original destination. The NavMeshAgent can’t see that variable and doesn’t know anything about it. You need to set a different destination (the player’s position?) for the NavMeshAgent to get the monster to chase the player.
1 Like
youre a genius, thank you
sadly it still goes on its own path and ignores me completely. any other suggestions?
Post the new code by using code tag