mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 23:56:29 +02:00
Ignore further up the hierarchy.
This commit is contained in:
parent
02cd97deb1
commit
16cfeff00d
1 changed files with 4 additions and 4 deletions
|
@ -165,12 +165,12 @@ void Hand::updateCollisions() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// and the current avatar
|
// and the current avatar (ignoring everything below the parent of the parent of the last free joint)
|
||||||
glm::vec3 owningPenetration;
|
glm::vec3 owningPenetration;
|
||||||
const Model& skeletonModel = _owningAvatar->getSkeletonModel();
|
const Model& skeletonModel = _owningAvatar->getSkeletonModel();
|
||||||
int skipIndex = skeletonModel.getLastFreeJointIndex(
|
int skipIndex = skeletonModel.getParentJointIndex(skeletonModel.getParentJointIndex(
|
||||||
(i == leftPalmIndex) ? skeletonModel.getLeftHandJointIndex() :
|
skeletonModel.getLastFreeJointIndex((i == leftPalmIndex) ? skeletonModel.getLeftHandJointIndex() :
|
||||||
(i == rightPalmIndex) ? skeletonModel.getRightHandJointIndex() : -1);
|
(i == rightPalmIndex) ? skeletonModel.getRightHandJointIndex() : -1)));
|
||||||
if (_owningAvatar->findSpherePenetration(palm.getPosition(), scaledPalmRadius, owningPenetration, skipIndex)) {
|
if (_owningAvatar->findSpherePenetration(palm.getPosition(), scaledPalmRadius, owningPenetration, skipIndex)) {
|
||||||
totalPenetration = addPenetrations(totalPenetration, owningPenetration);
|
totalPenetration = addPenetrations(totalPenetration, owningPenetration);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue