Getting the globe to spin (Gudbrand 03)
The idea of
the app is to pick a starting country and complete all the dishes on the globe
staring in your selected country. And we though it would be very cool to have a
globe the user can spin around when picking a country. After doing some
googling I found a way to rotate a mesh by pressing and dragging on the screen.
This left me with one problem, how do I implement buttons on the globe. The
answer ended up being quite simple indeed. By putting a mesh under the globe as
a child of the globe in the editor I was able to place out meshes representing
the countries where they would be on the globe in real life, and they would
spin together with the globe. I then created events for when these meshes where
clicked on. I had overlooked a big problem. I can click on countries when I’m
in other menus, to fix this I created a bool variable that would be set to
false whenever I load a widget that’s not the campaign and set to true when the
campaign is loaded.
With this all figured out we were ready to start working on the countries and the dishes they will include.
Kommentarer
Legg inn en kommentar