mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 06:54:11 +02:00
only check palms if active
This commit is contained in:
parent
893a3900d9
commit
0d76b370df
1 changed files with 3 additions and 0 deletions
|
@ -299,6 +299,9 @@ void Hand::updateCollisions() {
|
||||||
palm.setIsCollidingWithPalm(false);
|
palm.setIsCollidingWithPalm(false);
|
||||||
for (int j = 0; j < getNumPalms(); j++) {
|
for (int j = 0; j < getNumPalms(); j++) {
|
||||||
PalmData& otherPalm = otherAvatar->getHand().getPalms()[j];
|
PalmData& otherPalm = otherAvatar->getHand().getPalms()[j];
|
||||||
|
if (!otherPalm.isActive()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
glm::vec3 otherPalmPosition = otherPalm.getPosition();
|
glm::vec3 otherPalmPosition = otherPalm.getPosition();
|
||||||
if (glm::length(otherPalmPosition - myPalmPosition) < palmCollisionDistance) {
|
if (glm::length(otherPalmPosition - myPalmPosition) < palmCollisionDistance) {
|
||||||
palm.setIsCollidingWithPalm(true);
|
palm.setIsCollidingWithPalm(true);
|
||||||
|
|
Loading…
Reference in a new issue