A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Scripting' started by UMURAS, Jan 16, 2020 at 5:27 PM.
How do we move an object to a certain point, stop it and move it after a while?
Have you done any of the beginner tutorials at all? This is very basic tutorial kind of stuff, so I think you'd benefit from running through the tutorials.
What tutorials should I follow about this problem?
This is in the scripting section but for very simple things like this I would still recommend using the Animator recording function.
thank you for your answer but that's not what I mean as an example transform.Translate(Vector3.forward * Time.deltatime * 10);
I want to stop a moving object with this code and move it again after a while.
if (Vector3.Distance(transform.position, startPosition) < distanceToMove || condition to start moving again)
moving = true;
else moving = false;
your moving code
Thanks for your reply
No problem. If you want to make it stop after a certain time and then start moving again after some time, instead of basing this off of distance, I personally recommend using Coroutines.