I have a scene like given below(see the attached image with this post):
Now i want to make the objects hide behind the wall at lower position and do the following action: “Different Target Objects Move up from behind the wall wait for 3 seconds and then go down to lower postion. Next another Random target will go up and this continues.”
How can i do this. Please help with some code examples.
Thanks
Where do you run into problems? This should be quite easy, just choose a random target index using Random.Range and then apply transformations to that gameobject. So where exactly do you run into problems doing that?
There are a number of ways to do this, you could use animations (look into this if you have the time, it will make your life easier) but for now you need to simply determine the correct time to stop moving. As you are using Time.deltaTime you can’t use a fixed number of times to determine when to stop moving the targets. Simplest fix for now would probably be
Where do you run into problems? This should be quite easy, just choose a random target index using Random.Range and then apply transformations to that gameobject. So where exactly do you run into problems doing that?
– Mikael-H