Hello, I’m trying to get an NPC to walk beside the character as shown here. Currently, the NPC will walk towards the player while the distance between it and the player is greater than 2m. The NPC will then rotate to face the same way as the player (as shown here)
The code for the dog is here (I tried pasting it into this post but it came out weird)
I’ve been trying to find tutorials on how to do it, but the ones that I’d found didn’t make the NPC do what I wanted. If you have any pointers on what I should be doing or feedback on the code above, I would greatly appreciate it
Edit - 07/11/16
I haven’t tried it yet but my theory for the solution would be to create an empty object, as a child of the character object, then offset it to the right/left side of the character. Instead of having the NPC make its way to the character it would instead go towards the empty object.