From 0cdde4c585d50acfe3c34c775aed892859325498 Mon Sep 17 00:00:00 2001 From: Takahiro Date: Wed, 6 Sep 2023 11:30:58 +0900 Subject: [PATCH] Fix first object menu select bug --- src/react-components/room/hooks/useObjectList.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/react-components/room/hooks/useObjectList.js b/src/react-components/room/hooks/useObjectList.js index d3fea1a864..863a57053d 100644 --- a/src/react-components/room/hooks/useObjectList.js +++ b/src/react-components/room/hooks/useObjectList.js @@ -46,7 +46,11 @@ function handleInspect(scene, object, callback) { callback(object); - if (object.el.object3D !== cameraSystem.inspectable) { + const object3D = shouldUseNewLoader() + ? APP.world.eid2obj.get(object.el.eid) + : object.el.object3D; + + if (object3D !== cameraSystem.inspectable) { if (cameraSystem.inspectable) { cameraSystem.uninspect(false); }