N
N
Nik Titor2021-09-08 20:46:00
Unity
Nik Titor, 2021-09-08 20:46:00

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

2 answer(s)
K
KraGen.Developer, 2021-09-08
@KraGenDeveloper

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.

A
Andrey Boronnikov, 2021-09-09
@red-cat-fat

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 question

Ask a Question

731 491 924 answers to any question