Quest: Toady Froggerson
Challenge: You Move My World
Feel free to share your solutions, ideas and creations below. If you get stuck, you can find some ideas here for completing this challenge.
Quest: Toady Froggerson
Challenge: You Move My World
Feel free to share your solutions, ideas and creations below. If you get stuck, you can find some ideas here for completing this challenge.
I jumped straight into this one and then realised I had forgotten one important thing.
Don’t move them all on top of each other…
Kurt
This was an easy solution, in the Mover.cs script, in the Update() cycle
//TODO - Translate (move) all moveable objects based on the scoll vector
foreach (GameObject movableObject in movableObjects)
{
movableObject.gameObject.transform.Translate(scrollVector);
}
I did it just slightly differently
foreach (GameObject myobj in movableObjects)
{
myobj.transform.position = myobj.transform.position+scrollVector;
}
What are the pro’s and con’s of each?
Kurt
I believe that it does literally the exact same thing
(the translate function adds a value to transform.position)