This blog is about creating simple games, and has been set up to show progress of my first games.
Monday, 16 February 2015
Coroutines experiments
I have tried to find the idea for what I could use a coroutine in my game. I have decided to use it in a simple script that rotates collectable items. So at first when I have written a coroutine it didn't work. I added yield wait for fixed update method as it is a rigidbody and I have read it may need to be used in coroutines for rigidbodies. It still didn't work properly, but I have added FixedUpdate method to be called after start method and inside it starting the coroutine as well. Now the script finally works and rotates the rigidbody after waiting for 13 seconds.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment