mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
don't automatically unhook overlays from hands unless they were grabbable overlays
This commit is contained in:
parent
c677326025
commit
19a31d7630
1 changed files with 11 additions and 3 deletions
|
@ -3570,13 +3570,21 @@ function MyController(hand) {
|
|||
}
|
||||
_this.previouslyUnhooked[childID] = now;
|
||||
|
||||
// we don't know if it's an entity or an overlay
|
||||
if (Overlays.getProperty(childID, "grabbable")) {
|
||||
// only auto-unhook overlays that were flagged as grabbable. this avoids unhooking overlays
|
||||
// used in tutorial.
|
||||
Overlays.editOverlay(childID, {
|
||||
parentID: previousParentID,
|
||||
parentJointIndex: previousParentJointIndex
|
||||
});
|
||||
}
|
||||
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 });
|
||||
if (Overlays.getProperty(childID, "grabbable")) {
|
||||
Overlays.editOverlay(childID, { parentID: NULL_UUID });
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue