|
How can I get My zombie character to follow my player? also , getting it to avoid obstacles would be amazing, I have just started scripting and don't really understand how to go about this. Thanks
(comments are locked)
|
|
You could use the included SmoothFollow script to autorotate the zombies toward your player and give the zombies a persistent forward movement. You might also want to include some kind of state machine to track and organize when the zombies are in "idle" mode vs "chase" mode, in which case you could use a trigger collider or raycast to detect player proximity. Obstacle avoidance and pathfinding are more advanced subjects, but there are 3rd-party tools that might help you. design3 has tutorials on many topics that may help you, such as basic NPC AI and some game build walkthroughs that include collision detection and character control.
(comments are locked)
|

You're asking about AI pathfinding here. There is no simple solution!