Playmaker Forum

Playmaker Help & Tips => Playmaker Tutorials => Topic started by: bonsaisushi on May 29, 2017, 02:14:08 PM

Title: Request - Simple Wandering AI - It just needs to move around randomly
Post by: bonsaisushi on May 29, 2017, 02:14:08 PM
Hello everyone!
I'm currently looking for a wandering script for a 3d object, it just needs to move on X, Z (left and right, not upwards) inside a defined area (navMesh is okay)

I tried some tutorials on YouTube but none of them worked fine, does anyone know how to do something like this?
It just needs to move around randomly
Title: Re: Request - Simple Wandering AI - It just needs to move around randomly
Post by: Grendal on June 07, 2017, 07:30:23 AM
Take a look at my simple AI tutorial/kit. It will do what you are asking and much more. You can always cut out what you don't need or add to it as you like.

During its idle loop it will make a mob/object wander randomly at whatever speed you specify (or random speed) for a given time, or distance depending on your settings in the opening blocks. It could easily be modified so that it would stop upon a trigger (as in area boundary object) as well. It also has a patrolling part you can activate that looks for waypoints.   

http://hutonggames.com/playmakerforum/index.php?PHPSESSID=c4e5bbc12a9c7f12b45cdc82ff5d3906&topic=12870.0
Title: Re: Request - Simple Wandering AI - It just needs to move around randomly
Post by: OneWheelStudio on June 21, 2017, 08:30:45 AM
I've got a couple videos that might help. The first covers creating some AI that chases a player. The second is more to your question and adds in a random wander feature - the second video builds on the first.

Chase : https://www.youtube.com/watch?v=-xF7wuGPvI8

Random Wander : https://www.youtube.com/watch?v=3LTj0sslp1A