Sprint 9 – Jumanah

During this sprint I finally got to work with Kinect, as we only had one device amongst our group members, so I worked on creating the user interaction with the bear.  I faced some difficulties trying to understand the Kinect code as I did not work with much previously, as we were working separately.

The best way to implement the bear interaction was for the user to raise and spread their arms, to scare the bear out of the scene. I used the joints to get the angle between the left and right arm and store it in a bearAngle variable:

bearAngle = getAngle(rShoulder.getScreenPosition(), lShoulder.getScreenPosition(), 0);

If the angle is great then the bear would exit the scene from the left and a new obstacle will be set.

As we are reaching the end of this project, we will spend the upcoming weeks polishing the interactions, puppet and particle systems. The interaction we may have to drop is the user wood interaction due to time constraints.


Sample code:

if (users.returnRoar()) {
            bearPosition -= 5;
            cout << "BEAR POS" << bearPosition << "\n";
        else if (users.returnRoar() == false) {

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s