Open nihonium-cfx opened 3 years ago
Hi, thanks for reporting this. It's an interesting edge case; let me summarize to make sure we agree on what's happening:
m_appHotId
and m_hotDepth
on the context).m_appHotId
/m_hotDepth
are not reset and so Im3d still thinks this gizmo is highlighted.m_hotDepth
).I think this could be fixed internally by invalidating the hot/active state if the ID wasn't used by a gizmo within a frame. However I think your client code fix (calling Context::resetId()
on selection change events) is still good practice, I'll add a note somewhere in the docs about that.
If you're not already doing it I'd also suggest locking entity selection when interacting with a gizmo. It should be enough to just check Im3d::GetHotId() == Im3d::Id_Invalid
when changing entity selection. It would improve Ux and also neatly solve this problem.
This results in gizmo controls become unresponsive.
Somewhat general steps to reproduce:
Related issue in our project https://github.com/citizenfx/fivem/issues/928 fixed with workaround by resetting ids manually if ID gets changed.