S
S
sudaID2016-12-29 17:57:15
Unity
sudaID, 2016-12-29 17:57:15

How to handle elevator movement?

Hello everyone, such a question. It is necessary that when you press (the "E" key) on the elevator (while in any place), this elevator descends, and then, after a certain time, rises back. How is this implemented in Unity? As I understand it, there are 2 options: animation and script. But it seemed to me that it would be wrong to create your own animation for each such elevator, despite the fact that it will not process anything other than moving up and down. What remains is the script.
The idea is this: lower the elevator a distance equal to its size along the Y axis, somehow count a certain time, and then raise it again. I wrote all the preliminary code for interacting with the object, help with the code for moving the elevator.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GreatRash, 2016-12-29
@sudaID

lmgtfy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question