søndag den 18. april 2010

Further GUI study


With the need of implementing more, due to upcoming evaluation of the system in may.
Therefore a little upload of the progress in the GUI implementation, which lately have been suspended, since we all went on a trip to London.

The first screen is the testing setup in our expo project. Here a couple of cubes have been used as the symbol of animals. The last is the setup running.



A new update will come soon, since we are now back and working fast on the implementation while writing all the documentation along with implementing.

mandag den 5. april 2010

Simple GUI scripting

Since our project is about making an infotainment system, controlled by using a touch screen, we had the need for a simple GUI (Graphical User Interface) to be used in the demo for the Midterm Seminar tomorrow at the university.

We wanted the buttons to be centered horizontally and vertically in a "+"-shape in order to make the GUI intuitive, regarding the movement: Up, Down, Right, Left.

In order to center the "Up"-button horizantally, we used the (Screen.width divided by 2) minus 50 (half the size of the button rectangle).

(GUI.RepeatButton (Rect (((Screen.width)/2)-50,10,100,100), "Up"))
The same principle was used on the other buttons.

The picture above shows the 4 menu buttons in a test scene. Each of the buttons will make the camera move in it's direction when pushed.
Next step will be to make a custom design for the GUI-elements.

The code for the 4 buttons and the movement of the camera:
function OnGUI () {
if (GUI.RepeatButton (Rect (((Screen.width)/2)-50,10,100,100), "Up")) {
transform.Translate (0,0,0.5);
}
if (GUI.RepeatButton (Rect (((Screen.width)/2)-50,(Screen.height)-110,100,100), "Down")) {
transform.Translate (0,0,-0.5);
}
if (GUI.RepeatButton (Rect (10, ((Screen.height)/2)-50, 100, 100), "Left")) {
transform.Translate (-0.5,0,0);
}
if (GUI.RepeatButton (Rect (Screen.width-110, ((Screen.height)/2)-50, 100, 100), "Right")) {
transform.Translate (0.5,0,0);
}
}

fredag den 2. april 2010

Elephant model

The elephant is the first animal to inhabit the game world. Below is a few pictures, keep in mind the animation will take care of the stiff parts:)



onsdag den 10. marts 2010