I’m making an obstacle course and I need a platform to rotate along the Z axis to 60 degrees, wait 3 seconds, rotate to -60 degrees and then loop. I’m really new to unity, this is my first project and I’ve been stuck on this for a while. I thought of using an if statement but I don’t know how to correctly set it up, something that would be like:
Continue to increase z axis rotation by 1
If z axis rotation = 60
Wait 3 seconds
Start to decrease rotation by 1
If z axis rotation = -60
Loop
But I have no idea how to go about doing this. I also tried using Coroutines for the wait but that just messed up the code more. If someone could show me how to get this to work it would help me a ton
Thanks!