Search Unity

Trying to get an animal to follow me when I get close to it

Discussion in 'Navigation' started by BeaniBirb, Oct 10, 2017.

  1. BeaniBirb

    BeaniBirb

    Joined:
    Oct 10, 2017
    Posts:
    2
    So the goal I am trying to accomplish is to get a sheep to follow me whenever I am close to it, yet have it stop a few units away from me, then when I move away from it it will follow me again. All of this I wish to be achieved using Playmakers FSM, does anyone have any sort of tips I could use?
     
  2. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Without knowing much about playmaker I can say that you can do most of this simply through the navmesh system if you set your agent stopping distance to say 5 the Sheep will always stop 5 away from its destination the player ,then in playmaker you simply need to find what sets navmesh agents destination to the players position.
     
    MadeFromPolygons likes this.
  3. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    I could help you with proper game-development but I dont know much about playmaker. I always found using systems like playmaker to be a bad thing in the longrun as you end up not really understanding how to develop games, but instead just how to use that one system.

    My knowledge of programming from c# and unity API has much more transferable skills, hence why I can now develop using many other languages and engines too.

    What would happen if Unity asset store, Unity or Playmaker disappeared tomorrow? Just some food for thought.
     
    JBR-games likes this.