Merge pull request #795 from machinelevel/dev4

Rave glove adjustments per Ryan's requests: hide fingers and arms when r...
This commit is contained in:
ZappoMan 2013-08-06 13:45:42 -07:00
commit fb2a1cce50
2 changed files with 17 additions and 4 deletions

View file

@ -1379,6 +1379,17 @@ void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
for (int b = 0; b < NUM_AVATAR_BODY_BALLS; b++) {
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
if (b == BODY_BALL_HEAD_BASE) { // the head is rendered as a special
if (alpha > 0.0f) {

View file

@ -64,10 +64,10 @@ void Hand::simulate(float deltaTime, bool isMine) {
}
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();
_basePosition = head.getPosition() + head.getOrientation() * offset;
_basePosition = head.getPosition() + head.getOrientation() * leapHandsOffsetFromFace;
_baseOrientation = head.getOrientation();
// generate finger tip balls....
@ -154,8 +154,10 @@ void Hand::render(bool lookingInMirror) {
if ( SHOW_LEAP_HAND ) {
//renderLeapHands();
renderLeapFingerTrails();
renderLeapHandSpheres();
if (!isRaveGloveActive()) {
renderLeapFingerTrails();
renderLeapHandSpheres();
}
}
}