x


Zombie FPS

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

more ▼

asked Sep 21 '11 at 01:05 AM

fpsteele gravatar image

fpsteele
1 6 6 6

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

Sep 21 '11 at 09:17 AM syclamoth
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Sep 21 '11 at 02:05 AM

Design3.com gravatar image

Design3.com
640 1 1 10

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3747
x3340
x1175
x446
x112

asked: Sep 21 '11 at 01:05 AM

Seen: 1099 times

Last Updated: Sep 21 '11 at 09:17 AM