How to get the bounding box center of a TransformNode

Hi guys,

I’m trying to calculate the bounding box’s center of the TransformNode but it doesn’t seem to return what I expected. Can anyone please help?

Find center of root node | Babylon.js Playground (babylonjs.com)

Find center of root node | Babylon.js Playground (babylonjs.com)

2 Likes

you can simply use getHierarchyBoundingVectors

3 Likes

Thank @xiehangyun @MeshSlayer, both worked very well on my end. @MeshSlayer’s solution is more convenient to me.

2 Likes