mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 16:18:05 +02:00
Only do slaps for MyAvatar.
This commit is contained in:
parent
e793c207f9
commit
9523ea7d03
1 changed files with 4 additions and 4 deletions
|
@ -178,7 +178,7 @@ void Hand::collideAgainstAvatar(Avatar* avatar, bool isMyHand) {
|
||||||
}
|
}
|
||||||
glm::vec3 totalPenetration;
|
glm::vec3 totalPenetration;
|
||||||
ModelCollisionList collisions;
|
ModelCollisionList collisions;
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::PlaySlaps)) {
|
if (isMyHand && Menu::getInstance()->isOptionChecked(MenuOption::PlaySlaps)) {
|
||||||
// Check for palm collisions
|
// Check for palm collisions
|
||||||
glm::vec3 myPalmPosition = palm.getPosition();
|
glm::vec3 myPalmPosition = palm.getPosition();
|
||||||
float palmCollisionDistance = 0.1f;
|
float palmCollisionDistance = 0.1f;
|
||||||
|
@ -220,10 +220,10 @@ void Hand::collideAgainstAvatar(Avatar* avatar, bool isMyHand) {
|
||||||
totalPenetration = addPenetrations(totalPenetration, collisions[j]._penetration);
|
totalPenetration = addPenetrations(totalPenetration, collisions[j]._penetration);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// when this !isMyHand then avatar is MyAvatar and we apply the collision
|
// when !isMyHand then avatar is MyAvatar and we apply the collision
|
||||||
// which might not do anything (hand hit unmovable part of MyAvatar) however
|
// which might not do anything (hand hit unmovable part of MyAvatar) however
|
||||||
// we don't resolve the hand's penetration (we expect their simulation
|
// we don't resolve the hand's penetration because we expect the remote
|
||||||
// to do the right thing).
|
// simulation to do the right thing.
|
||||||
avatar->applyCollision(collisions[j]);
|
avatar->applyCollision(collisions[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue