From ee9ae3f2208136e7dc499d92faa8b3b9ee54c73b Mon Sep 17 00:00:00 2001 From: Jeffrey Ventrella Date: Wed, 24 Apr 2013 08:13:15 -0700 Subject: [PATCH] improved avatar hand-holding logic --- interface/src/Head.cpp | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/interface/src/Head.cpp b/interface/src/Head.cpp index de6ce91bbd..9770bcbce1 100644 --- a/interface/src/Head.cpp +++ b/interface/src/Head.cpp @@ -1006,11 +1006,14 @@ void Head::updateSkeleton() { _bone[b].position = _bone[ _bone[b].parent ].position; } - ///TEST! - get this working and then add a comment; JJV + //------------------------------------------------------------------------------------- + // if this is not my avatar, then hand position comes from transmitted data + //------------------------------------------------------------------------------------- if ( ! _isMine ) { _bone[ AVATAR_BONE_RIGHT_HAND ].position = _handPosition; } + // the following will be replaced by a proper rotation... float xx = glm::dot( _bone[b].defaultPosePosition, _bone[b].orientation.getRight() ); float yy = glm::dot( _bone[b].defaultPosePosition, _bone[b].orientation.getUp () ); float zz = glm::dot( _bone[b].defaultPosePosition, _bone[b].orientation.getFront() ); @@ -1024,7 +1027,6 @@ void Head::updateSkeleton() { } } - void Head::initializeBodySprings() { for (int b=0; b