mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 14:33:31 +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;
|
||||
const Model& skeletonModel = _owningAvatar->getSkeletonModel();
|
||||
int skipIndex = skeletonModel.getLastFreeJointIndex(
|
||||
(i == leftPalmIndex) ? skeletonModel.getLeftHandJointIndex() :
|
||||
(i == rightPalmIndex) ? skeletonModel.getRightHandJointIndex() : -1);
|
||||
int skipIndex = skeletonModel.getParentJointIndex(skeletonModel.getParentJointIndex(
|
||||
skeletonModel.getLastFreeJointIndex((i == leftPalmIndex) ? skeletonModel.getLeftHandJointIndex() :
|
||||
(i == rightPalmIndex) ? skeletonModel.getRightHandJointIndex() : -1)));
|
||||
if (_owningAvatar->findSpherePenetration(palm.getPosition(), scaledPalmRadius, owningPenetration, skipIndex)) {
|
||||
totalPenetration = addPenetrations(totalPenetration, owningPenetration);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue