Get node's 3d-mesh size?

Hi all
I’m using Creator 3.8.2 and I wonder how can I get the node’s mesh’s size?
I’ve tried “node.meshRender._boundingBox” but it seemed deprecated

Thanks so much!

node.meshRender.model.modelBounds
1 Like

Thanks so much!
That’s the code I need!

For others to get node’s mesh size

    function getNodeMeshSize(node) {
        const halfExtents = node.getComponent(MeshRenderer).model.modelBounds.halfExtents;
        return halfExtents.clone().multiplyScalar(2);
    }
1 Like