Answer the question
In order to leave comments, you need to log in
How to animate an object through code?
I need to make an animation for an object so that the object moves along one axis (y). The fact is that I have several objects that should have animation (up, down) smoothly. When animating through Unity animation, all objects move to the same point. In short, I need to make sure that all objects move smoothly up and down at the same time and that they are in different places. How to do it?
Answer the question
In order to leave comments, you need to log in
DOTween asset:
float upY = 5f;
float time = 2f;
transform.DOMoveY(upY, time).SetLoops(-1, LoopType.Yoyo);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question