D
D
Dmitry Korolev2016-12-29 02:50:45
C++ / C#
Dmitry Korolev, 2016-12-29 02:50:45

How to follow object after object in only one axis?

Good evening. I need to fix go for go on one axis only.
so that he runs like a string after me in a straight line

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-12-29
@adressmoeistranici

it is possible like this:

Vector3  position = new Vector3(go1.transform.position.x, go2.transform.position.y, go2.transform.position.z);
go2.transform.position = position;

where:
go1 - main GO
go2 - "child" GO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question