Gizmo Mesh Behaviour Camera Angle

This might be a bit of a weird one. I’ve made some behaviour that will make my gizmos act as “2d” by rotating towards the camera. This all works as intended. However, I now ran into a peculiar issue, I’ve noticed that when the (in this case position z Plane) is aligned with the camera in such a way that it would appear flat, it stops responding.

I’ve made the following playground to demonstrate:

You can enable/disable MakeGizmos2D() to compare. To show you what I mean:

Summary

(2d view, doesn’t respond to dragging. even the dragging behaviour onDrag event won’t react)


(normal view, here it’s flat, which I think is related to this issue.)

(Side view to show what it looks like in this form)

Mind you this playground is not a 100% the same as my personal setup, but with this setup you can see the same issue occurring so I assume it comes down to the same root issue.

I tried updating boundingInfo and matrices of the gizmo mesh but I couldn’t find anything to fix this yet.
I think it has something to do with it not registering that it’s hovering on the gizmo mesh internally due to it normally being flat from this angle which doesn’t allow it to be picked, but I can’t confirm.

cc @Cedric

Hi @Forsaken Did you try using Babylon.js docs instead of the private properties?

1 Like

I have tried in the past, not successfully however. But I’ve tried again and managed to get something working, this also seems to fix my issue so that’s great!

1 Like