Rave glove adjustments per Ryan's requests: hide fingers and arms when raving, center hands in front of face.

This commit is contained in:
Eric Johnston 2013-08-06 12:44:29 -07:00
parent bb15eb664c
commit 9a4a0e2819
2 changed files with 17 additions and 4 deletions

View file

@ -1373,6 +1373,17 @@ void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
for (int b = 0; b < NUM_AVATAR_BODY_BALLS; b++) { for (int b = 0; b < NUM_AVATAR_BODY_BALLS; b++) {
float alpha = getBallRenderAlpha(b, lookingInMirror); float alpha = getBallRenderAlpha(b, lookingInMirror);
// When in rave glove mode, don't show the arms at all.
if (_hand.isRaveGloveActive()) {
if (b == BODY_BALL_LEFT_ELBOW
|| b == BODY_BALL_LEFT_WRIST
|| b == BODY_BALL_LEFT_FINGERTIPS
|| b == BODY_BALL_RIGHT_ELBOW
|| b == BODY_BALL_RIGHT_WRIST
|| b == BODY_BALL_RIGHT_FINGERTIPS) {
continue;
}
}
// Always render other people, and render myself when beyond threshold distance // Always render other people, and render myself when beyond threshold distance
if (b == BODY_BALL_HEAD_BASE) { // the head is rendered as a special if (b == BODY_BALL_HEAD_BASE) { // the head is rendered as a special
if (alpha > 0.0f) { if (alpha > 0.0f) {

View file

@ -64,10 +64,10 @@ void Hand::simulate(float deltaTime, bool isMine) {
} }
void Hand::calculateGeometry() { void Hand::calculateGeometry() {
glm::vec3 offset(0.2, -0.2, -0.3); // place the hand in front of the face where we can see it const glm::vec3 leapHandsOffsetFromFace(0.0, -0.2, -0.3); // place the hand in front of the face where we can see it
Head& head = _owningAvatar->getHead(); Head& head = _owningAvatar->getHead();
_basePosition = head.getPosition() + head.getOrientation() * offset; _basePosition = head.getPosition() + head.getOrientation() * leapHandsOffsetFromFace;
_baseOrientation = head.getOrientation(); _baseOrientation = head.getOrientation();
// generate finger tip balls.... // generate finger tip balls....
@ -154,9 +154,11 @@ void Hand::render(bool lookingInMirror) {
if ( SHOW_LEAP_HAND ) { if ( SHOW_LEAP_HAND ) {
//renderLeapHands(); //renderLeapHands();
if (!isRaveGloveActive()) {
renderLeapFingerTrails(); renderLeapFingerTrails();
renderLeapHandSpheres(); renderLeapHandSpheres();
} }
}
} }
void Hand::renderRaveGloveStage() { void Hand::renderRaveGloveStage() {