Sprint 8 – Lukundu

This sprint I focused on correct size issue with the character, and joint rotation.
The resizing is related to how much space characters takes up relative to screen, allowing for users to experience more of environment. The joint rotation lock problem comes the rotation hierarchy, the child joint rotation canceling out the next rotation, to fix this apply the negative angle from the joint above before applying new rotation.

ofRotate(0, 0, 0, 1);
body_IMG.setAnchorPoint(body_IMG.getWidth() /4, body_IMG.getHeight() / 4);

//left arm
l_arm_IMG.setAnchorPoint(l_arm_IMG.getWidth()/4, 5);
ofTranslate(-42.5, 15);
ofRotate(getAngle(lShoulder.getScreenPosition(), lElbow.getScreenPosition(),0), 0, 0, 1);
l_arm_IMG.draw(0,0,0, l_arm_IMG.getWidth()/2, l_arm_IMG.getHeight()/2);

//Left forearm
ofTranslate(0, l_arm_IMG.getHeight()/2 - 5);
ofRotate(-getAngle(lShoulder.getScreenPosition(), lElbow.getScreenPosition(), 0), 0, 0, 1);
ofRotate(getAngle(lElbow.getScreenPosition(), lWrist.getScreenPosition(),0), 0, 0, 1);
forearm_IMG.setAnchorPoint(forearm_IMG.getWidth() / 4, 0);
forearm_IMG.draw(0, 0, forearm_IMG.getWidth()/2, forearm_IMG.getHeight()/2);

//Left hand
l_hand_IMG.setAnchorPoint(l_hand_IMG.getWidth() /4, 5);
ofTranslate(0, forearm_IMG.getHeight()/2 - 2.5);
l_hand_IMG.draw(0, 0, l_hand_IMG.getWidth()/2, l_hand_IMG.getHeight()/2);

The biggest problem was presented by the way the character isn’t moved by change position but driven by on angle between Kinect joints parented to the body. The collision requires the joint positions in order to calculate the interaction of point to line. I’ll have to redesign the way the body is driven or possible look into make the body segments into box2D elements.


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s