BoundingBox is completely broken
Overview
I am still waiting for the day when the BoundingBox becomes a usable feature, but it seems that's still some time in the future. After fixing a bug to even interact with the box I encountered a few more and I think someone should sit down and fix this box once and for all:
-
Hololens/ MR Headset: Selecting a handle makes it glitch out for the first frame (Hololens). Repeatedly clicking the handle scales the box larger and larger (MR Headset). I scaled one of the handles up to better see what's going on. The problem seems to be that during the first frame of interaction when the scale is calculated, the TransformHandleWithRay method is used. From then on TransformHandleWithPoint is used. This happens because OnInputChanged is constantly called, but will set the relevant usingPose bool not until OnInputDown set the currentInputSource to a reference. I tried to find out when TransformHandleWithRay is used then, but there seems to be no use for that. Since OnInputChanged is constantly spammed and on first appearance of an InputSource sets usingPose to true, it's just the first frame ever. TransformHandleWithRay could very well be removed so it seems.
-
Scaling: Then I tested the scaling just using TransformHandleWithPoint. It worked, but did not feel very good. The scale happens way too slow and does not feel right.
-
Rotating: The rotation code tries to calculate axis aligned oriented collider bounds in UpdateBounds and fails because the collider is not recalculated during the frame, only the transform is changed. The collider would need to be toggled, twice (back and forth), which is not what you do within an Update-Loop. The dimensions should be cashed and used for this operation. Since this is all not happening, the BoundingBox always scales to the size of the actual bounds, which of course resize to the diagonals of the collider.
-
There is no feedback for hovering a handle (Microsoft London suggested that too)
-
The BoundingBox can' be moved
-
Oh and by the way, the SceneContent gameobject in the BoundingBoxExample scene has an empty component on it which can be removed
Expected Behavior
Working BoundingBox
Actual Behavior
Not working BoundingBox
Steps to reproduce
- pull my fork in
- Run the BoundingBoxExample scene
- scale any handle up to a fairly big size to better see the effects
- use the box
Unity Editor Version
2018.3.6f1
Mixed Reality Toolkit Release Version
I don't think it matters (mrtk_development)
@cre8ivepark Just wanted to ask if you are or will be working on the BoundingBox and the ManipulationHandler? I wouldn't want to jump in if my work would be in vain.
@Alexees We do have a decent amount of changes to both those scripts coming soon from our HoloLens 2 integration. Might be worth waiting until then to jump in.
@keveleigh what is the status about the box? we'll soon be switching towards the latest MRTK and need a functional one then. if the box is not going to be fixed on your side for some time, maybe I can jump in on whatever current implementation you have and help?
Having similar issues on Unity 2018.3.9f1 and v2 Beta, haven't tested the bounding box with RC1 yet though. While the bounding box mostly works, the handles don't do anything at all when selected-- they mostly act like any other air-tap input on the collider. Any insight would be much appreciated!
Many of these issues have been fixed in RC1 and RC2, so closing this so we can re-open new issues for specific bugs.