GMU:Digital Puppetry Lab/Group Ben & Luca: Difference between revisions

From Medien Wiki
Line 111: Line 111:


====Step 1: Declaring private/public variables====
====Step 1: Declaring private/public variables====
Our main task was to animate the "Dance Floor" where the party takes place. The "gameReciever" is our Dance Floor which will be fetched from our script and get's ghis position translated afterwards. We also created a variable for our screen overlay, one for the Y position of our Dance Floor and another one for the text which will be shown when no input comes in. In the Start function we inserted one line which will find the display variable and the GameObject "Canvas" on startup to avoid the text and the canvas from disapearing.
Our main task was to animate the "Dance Floor" where the party takes place. The "gameReciever" is our Dance Floor which will be fetched from our script and get's ghis position translated afterwards.<br> We also created a variable for our screen overlay, one for the Y position of our Dance Floor and another one for the text which will be shown when no input comes in. In the Start function we inserted one line which will find the display variable and the GameObject "Canvas" on startup to avoid the text and the canvas from disapearing.
 
====Step 2: Update Functions====
====Step 2: Update Functions====
In our update function we check the values of the osc message stream. We have set up controllers for the audio source with the beat loop and also a controller to display the text and another one for moving the dance floor.<br> If the text isn't shown the audio volume is set to 1. if not the volume gets muted. The same thing for the text. "yPos" controls the Y coordinate of the Dance Floor.
In our update function we check the values of the osc message stream. We have set up controllers for the audio source with the beat loop and also a controller to display the text and another one for moving the dance floor.<br> If the text isn't shown the audio volume is set to 1. if not the volume gets muted. The same thing for the text. "yPos" controls the Y coordinate of the Dance Floor.