- Home /
I make a camera that change position every X seconds but i need different waiting time for each position that take.
I was dealing with invokerepeating:
InvokeRepeating("ChangePosition",getTimeforEachScene(transform.position.x), getTimeforEachScene(transform.position.x));
public float getTimeforEachScene(float positioCam)
{
float designedtime = 0;
if (positioCam == 0F)
{
designedtime = 0.3F;
}
if (positioCam == 20F) {
designedtime = 10F;
}
if (positioCam == 40F)
{
designedtime = 0.3F;
}
return designedtime;
}
but I noticed that it is not the correct way. **The camera moves in axis x + 20F every few seconds, but in this case I want each plane to take the focus of the camera, but each take a separate focus time, it is not the same time for all 3 planes.**like a movie scenes. then check it out and say it can be done with Coroutines, it would help me a lot if I any of you guys have some example that more or less suited my case. Thanks in advance guys.
unitypro2.jpg
(157.3 kB)
unitypro2.jpg
(184.7 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612103344im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
throwing a ball camera position changes 0 Answers
How can camera Forward Or How to change position of camera? 1 Answer
Change position - cameras - slider 1 Answer
How To Slow Camera Position Transform? 3 Answers
character view range 2 Answers