fix placement

This commit is contained in:
wass08
2026-02-25 15:21:19 +09:00
parent b114e60df7
commit ced76b0475
5 changed files with 38 additions and 19 deletions
@@ -8,6 +8,7 @@ export const DoorRenderer = ({ node }: { node: DoorNode }) => {
useRegistry(node.id, 'door', ref)
const handlers = useNodeEvents(node, 'door')
const isTransient = !!(node.metadata as Record<string, unknown> | null)?.isTransient
return (
<mesh
@@ -17,7 +18,7 @@ export const DoorRenderer = ({ node }: { node: DoorNode }) => {
visible={node.visible}
position={node.position}
rotation={node.rotation}
{...handlers}
{...(isTransient ? {} : handlers)}
>
{/* DoorSystem replaces this geometry each time the node is dirty */}
<boxGeometry args={[0, 0, 0]} />
@@ -12,11 +12,11 @@ export const WallRenderer = ({ node }: { node: WallNode }) => {
const handlers = useNodeEvents(node, 'wall')
return (
<mesh ref={ref} castShadow receiveShadow visible={node.visible} {...handlers}>
<mesh ref={ref} castShadow receiveShadow visible={node.visible}>
{/* WallSystem will replace this geometry in the next frame */}
<boxGeometry args={[0, 0, 0]} />
{/* Collision mesh: full-wall geometry (no cutouts) for WallSystem, no event handlers */}
<mesh name="collision-mesh" visible={false}>
{/* Collision mesh: full-wall geometry (no cutouts) for pointer events */}
<mesh name="collision-mesh" visible={false} {...handlers}>
<boxGeometry args={[0, 0, 0]} />
</mesh>
@@ -8,6 +8,7 @@ export const WindowRenderer = ({ node }: { node: WindowNode }) => {
useRegistry(node.id, 'window', ref)
const handlers = useNodeEvents(node, 'window')
const isTransient = !!(node.metadata as Record<string, unknown> | null)?.isTransient
return (
<mesh
@@ -17,7 +18,7 @@ export const WindowRenderer = ({ node }: { node: WindowNode }) => {
visible={node.visible}
position={node.position}
rotation={node.rotation}
{...handlers}
{...(isTransient ? {} : handlers)}
>
{/* WindowSystem replaces this geometry each time the node is dirty */}
<boxGeometry args={[0, 0, 0]} />