Hi guys!!!
Im making a survival game and im already make the map and the building but also i want add another feature to taming dog for example and then let follow me and why not attacking
other player etc etc???
Im already looking around but i didnt find any post to how taming animal…so this is my last beach…
if someone can help me im really apprecitate im wait your answer byeeeee!!!
Oh boy, don’t posts these days need approval? That used to be a thing. Anyway…
You’re not gonna find posts as specific as “how to tame an animal”, because everybody has their own way of achieving something like that.
You first want your animal to follow your player around which, can be done in a more primitive manner like, using Vector3.MoveTowards, and Quaternion.LookRotation combined with Quaternion.Slerp to smoothly make the animal rotate towards the player and move at the same time.
The other option would be path finding which is a bit more advanced…
You could use the first thing I mentioned combined with raycasting to prevent collision which, won’t work as well as path finding but it’d be a start.
If you want the animal to engage in a different behavior like, following another player on command, you might wanna make a variable and use if statements in the update function, in one case it would follow the player, in another case it would follow the player or animal being attacked.
And here’s the documentation for each thing you might need for the first option:
But assuming you don’t have the necessary experience to just look at these pages and figure out what you need to do… You might wanna check a few tutorials on animal AI.
One of them would be: Unity Tutorial: AI for Games! [Animal-style hunting and avoidance] - YouTube
It’s an hour long but the guy explains it really well.
Try not to copy the code or download it, just, try to read it and understand what it’s doing.
It’s not that hard.