I'm trying to get the updated position of a mesh after moving it with the Drei Pivot Controls, but digging into the object it says the position is [0,0,0]. How can I console.log the position after dragging a mesh?
const meshRef = useRef();
const handleDragEnd = () => {
const model = meshRef.current
debugger
};
return (
<PivotControls anchor={[0, 0, 0]} onDragEnd ={handleDragEnd}>
<primitive ref={meshRef} scale={scale} position={position} rotation={rotation} object={loadedModel.scene} />
</PivotControls>
)