mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-12 17:24:03 +02:00
thingy
This commit is contained in:
parent
9d548c43ad
commit
6c58dbeab2
2 changed files with 9 additions and 9 deletions
|
@ -503,12 +503,12 @@ void Avatar::updateHandMovementAndTouching(float deltaTime) {
|
|||
|
||||
//if holding hands, apply the appropriate forces
|
||||
if (_avatarTouch.getHoldingHands()) {
|
||||
_handHoldingPosition +=
|
||||
(
|
||||
_interactingOther->_joint[ AVATAR_JOINT_RIGHT_FINGERTIPS ].springyPosition
|
||||
- _handHoldingPosition
|
||||
) * 0.1f;
|
||||
_joint[ AVATAR_JOINT_RIGHT_FINGERTIPS ].position = _handHoldingPosition;
|
||||
|
||||
glm::vec3 vector = _interactingOther->_joint[ AVATAR_JOINT_RIGHT_FINGERTIPS ].springyPosition - _handHoldingPosition;
|
||||
glm::vec3 force = vector * 0.1f;
|
||||
|
||||
_joint[ AVATAR_JOINT_RIGHT_FINGERTIPS ].position += force;
|
||||
//_joint[ AVATAR_JOINT_RIGHT_FINGERTIPS ].position = _handHoldingPosition;
|
||||
} else {
|
||||
_handHoldingPosition = _joint[ AVATAR_JOINT_RIGHT_FINGERTIPS ].position;
|
||||
}
|
||||
|
|
|
@ -100,19 +100,19 @@ void AvatarTouch::render(glm::vec3 cameraPosition) {
|
|||
// show is we are golding hands...
|
||||
if (_weAreHoldingHands) {
|
||||
glColor4f(0.9, 0.3, 0.3, 0.5);
|
||||
renderSphereOutline(_myHandPosition, HANDS_CLOSE_ENOUGH_TO_GRASP / 3.0f, 20, cameraPosition);
|
||||
renderSphereOutline(_myHandPosition, HANDS_CLOSE_ENOUGH_TO_GRASP * 0.3f, 20, cameraPosition);
|
||||
renderSphereOutline(_myHandPosition, HANDS_CLOSE_ENOUGH_TO_GRASP * 0.2f, 20, cameraPosition);
|
||||
renderSphereOutline(_myHandPosition, HANDS_CLOSE_ENOUGH_TO_GRASP * 0.1f, 20, cameraPosition);
|
||||
}
|
||||
|
||||
//render the beam between our hands indicting that we can reach out and grasp hands...
|
||||
renderBeamBetweenHands();
|
||||
|
||||
/*
|
||||
//show that our hands are close enough to grasp..
|
||||
if (_handsCloseEnoughToGrasp) {
|
||||
glColor4f(0.9, 0.3, 0.3, 0.5);
|
||||
renderSphereOutline(_myHandPosition, HANDS_CLOSE_ENOUGH_TO_GRASP / 3.0f, 20, cameraPosition);
|
||||
}
|
||||
*/
|
||||
|
||||
// if your hand is grasping, show it...
|
||||
if (_yourHandState == HAND_STATE_GRASPING) {
|
||||
|
|
Loading…
Reference in a new issue