D
D
Denis Chirik2020-02-29 17:48:36
2D
Denis Chirik, 2020-02-29 17:48:36

Y-axis platform movement, how to implement?

Good afternoon, tell me a code example, if you don't mind!
There is a platform, it must be made to move up and down to a certain height, in a certain period of time!
I can move it along the X axis, but the problem is with Y!
I apologize in advance for being so stupid.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DanielMcRon, 2020-02-29
@Steos_live

Vector3.MoveTowards(transform.position,new Vector3(transform.position.x, transform.position.y + Vector3.up * 5, 0) ,transform.position.z );
5 - это поднятие вверх на 5 метров

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question