Hello everyone!
The problem I found starts on 11 second. When I want to scale the gizmo it starts to randomly jump in scaling and at the end of the video it becomes very big. Is there any way to set the maximum size of gizmo?
+1 to what Deltakosh said, Cedric should be able to give you a lot more context about this. Regarding just purely setting a max size, you can try adding a clamping behavior to the bounding box itself in order to prevent its size from exceeding certain parameters.
That may work as a stopgap, depending on the particular scenario you’re trying to handle. However, I’m not 100% sure this addresses the underlying issue of what you’re seeing, The artifact in your video (which I was able to reproduce in the Playground by dragging the gizmo past its far corner very fast) seems to be the result of some surprising behavior in the gizmo resize math, possibly involving a singularity on line 278 as the bounding box’s size tries to go to zero while drag distance is large. I’m not completely sure I’ve properly understood what that math is trying to do, though, so I could be wrong; Cedric will almost certainly know more about that and should be able to help more definitively when he gets back.
Hope this at least helps in the short term, though, and best of luck!
@Deltakosh, @syntheticmagus, thank you for your answers!
That’s not a big deal, for now, I think nobody noticed this bug expect me! @syntheticmagus I’ve been testing your idea and I found something similar to the bug I found before. Differs in that scaling changes cylinder’s height now
The jittered scale happen because of Gimbal Lock in pointDragBehavior. Now the hard part trying to fix it
Every time there is a call to lookat, there is a potential GimbalLock. It just needs to good condition to show its face
Thank you for your work!
I’ve tried a new version in my app and in the playground and it seems to be glitched still. That is very tricky bug! Here’s the video: