-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Labels
Status: Help WantedExtra attention is needed to resolve the issue.Extra attention is needed to resolve the issue.Type: BugA problem with an existing feature that can be fixed with the next patched release.A problem with an existing feature that can be fixed with the next patched release.Type: Good First IssueIssue that is good for newcomers.Issue that is good for newcomers.
Description
Describe the bug
Bounds control gets active in the state "Focus" if the bounds control is visible and object manipulator gets disabled
To reproduce
Steps to reproduce the behavior:
- See the attachment "Bounds Control Bug.zip". Unzip it and add it to the project
- Open the scene "Bounds Test.Unity"
- Click "Play"
- See how the cube gets selected, and, while is selected, the manipulator gets disabled.
- See how the cube keeps the "Focus" state of the bounds control
- Stop the execution. Go to the GameObject "Debug" and click "Hot fix" in the Bounds Test. Play again
- See how now the behavior is correct
Expected behavior
The bounds control disappears when the object manipulator is disabled
Bounds.Control.mp4
Your setup (please complete the following information)
- Unity Version [e.g. 2021.3.26f1]
- MRTK Version or Commit. Latest [e.g. v3.0] [e.g. ba32bb2]
Target platform (please complete the following information)
All of them
Additional context
In this line
Line 205 in 1e06019
| bool handlesActive = boundsControl != null && boundsControl.HandlesActive; |
HandlesActive returns true when object manpulator is disabled. Because HandlesActive is true, targetActiveFocus is 1, so the focus state stays
Why does HandlesActive become true when the object is disabled? I am not sure but this is the callstack. OnHostDeselected inverts the value of HandlesActive , and, because it was false, now it is true
As a workarround, you can do boundsControl.HandlesActive = false; after objectManipulator.enabled = false;
Metadata
Metadata
Assignees
Labels
Status: Help WantedExtra attention is needed to resolve the issue.Extra attention is needed to resolve the issue.Type: BugA problem with an existing feature that can be fixed with the next patched release.A problem with an existing feature that can be fixed with the next patched release.Type: Good First IssueIssue that is good for newcomers.Issue that is good for newcomers.
