Answer the question
In order to leave comments, you need to log in
How to make an object/NPC move freely?
I am making a top view game. NPCs (let's take animals) that I have only go back and forth, like bobbleheads. How to make them move freely in a certain space, for example, a deer will sit in a clearing, and only in this clearing can move.
Answer the question
In order to leave comments, you need to log in
Guys, I immediately say I myself recently began to study Yunka and Sea Sharp.
In general, take a clearing for a deer. I would make triggers along the borders of the clearing that would give the deer a turn (random), that is, the deer is walking and then bam .. collided with the trigger, and the trigger turned it -+ by 65 degrees.
NavMesh can be used to move in 3D space. There are many different tutorials on YouTube on this topic. For example here .
And for 2D space, you need to do something of your own. Describe how to move with your hands. Look for this about moving Rigidbody2D.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question