mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 20:24:13 +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;
|
return;
|
||||||
}
|
}
|
||||||
parent->forEachChild([&](SpatiallyNestablePointer child) {
|
parent->forEachChild([&](SpatiallyNestablePointer child) {
|
||||||
if (child->getParentJointIndex() == jointIndex &&
|
if (child->getParentJointIndex() == jointIndex) {
|
||||||
child->getNestableType() != NestableType::Overlay) {
|
|
||||||
result.push_back(child->getID());
|
result.push_back(child->getID());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -3213,9 +3213,13 @@ function MyController(hand) {
|
||||||
}
|
}
|
||||||
_this.previouslyUnhooked[childID] = now;
|
_this.previouslyUnhooked[childID] = now;
|
||||||
|
|
||||||
|
// we don't know if it's an entity or an overlay
|
||||||
Entities.editEntity(childID, { parentID: previousParentID, parentJointIndex: previousParentJointIndex });
|
Entities.editEntity(childID, { parentID: previousParentID, parentJointIndex: previousParentJointIndex });
|
||||||
|
Overlays.editOverlay(childID, { parentID: previousParentID, parentJointIndex: previousParentJointIndex });
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Entities.editEntity(childID, { parentID: NULL_UUID });
|
Entities.editEntity(childID, { parentID: NULL_UUID });
|
||||||
|
Overlays.editOverlay(childID, { parentID: NULL_UUID });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue