mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:43:53 +02:00
don't allow tablet to get stuck to a hand when passing it back and forth between hands
This commit is contained in:
parent
71ab6a1a84
commit
eedc5c1647
2 changed files with 5 additions and 2 deletions
|
@ -1419,8 +1419,7 @@ QVector<QUuid> EntityScriptingInterface::getChildrenIDsOfJoint(const QUuid& pare
|
|||
return;
|
||||
}
|
||||
parent->forEachChild([&](SpatiallyNestablePointer child) {
|
||||
if (child->getParentJointIndex() == jointIndex &&
|
||||
child->getNestableType() != NestableType::Overlay) {
|
||||
if (child->getParentJointIndex() == jointIndex) {
|
||||
result.push_back(child->getID());
|
||||
}
|
||||
});
|
||||
|
|
|
@ -3213,9 +3213,13 @@ function MyController(hand) {
|
|||
}
|
||||
_this.previouslyUnhooked[childID] = now;
|
||||
|
||||
// we don't know if it's an entity or an overlay
|
||||
Entities.editEntity(childID, { parentID: previousParentID, parentJointIndex: previousParentJointIndex });
|
||||
Overlays.editOverlay(childID, { parentID: previousParentID, parentJointIndex: previousParentJointIndex });
|
||||
|
||||
} else {
|
||||
Entities.editEntity(childID, { parentID: NULL_UUID });
|
||||
Overlays.editOverlay(childID, { parentID: NULL_UUID });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue