Hello Babylon.js Community,
I hope you’re all doing well. I’ve recently encountered an issue with Gizmo controls in my Babylon.js scene, and I’m seeking some guidance or assistance to resolve it.
Here’s the situation:
I’ve added a GizmoManager to my scene using the following code:
const gizmoManager: Ref<GizmoManager | null> = ref(null)
gizmoManager.value = new GizmoManager(sceneRef.value)
gizmoManager.value.positionGizmoEnabled = true
gizmoManager.value.rotationGizmoEnabled = true
gizmoManager.value.scaleGizmoEnabled = true
gizmoManager.value.boundingBoxGizmoEnabled = true
document.onkeydown = (e) => {
if (e.key === 'w') {
gizmoManager.value.positionGizmoEnabled = !gizmoManager.value.positionGizmoEnabled
}
if (e.key === 'e') {
gizmoManager.value.rotationGizmoEnabled = !gizmoManager.value.rotationGizmoEnabled
}
if (e.key === 'r') {
gizmoManager.value.scaleGizmoEnabled = !gizmoManager.value.scaleGizmoEnabled
}
if (e.key === 'q') {
gizmoManager.value.boundingBoxGizmoEnabled = !gizmoManager.value.boundingBoxGizmoEnabled
}
}
The Gizmo appears in my scene, and I can successfully drag any mesh with my pointer. However, the controls for positionGizmoEnabled, rotationGizmoEnabled, and scaleGizmoEnabled don’t seem to be working. In fact, they don’t appear at all, regardless of what I do.
I’m wondering if there’s something I’m missing or if there’s a known issue related to this. Any help or advice on how to troubleshoot and resolve this problem would be greatly appreciated.
Thank you in advance for your assistance.