Correct way to create a cube the exact same position, scale, rotation as another mesh


What is the correct way to create a cube/bounding box mesh the exact same position, scale, rotation as another mesh?

I want to create a colored alpha mesh around another mesh.


1 Like

Hi budy,

You should read this post Highlight or changing material in instance meshes

I think you will find everything you need :wink:

1 Like

HI @Philemon13,

Thanks for the super quick reply.

The solution looks good but the mesh I want to wrap in a box is only a parent mesh with a bunch of child meshes. How do I update the parent mesh first so it has the correct data for the box to scale to?


Get the bounding min max of all the child elements and store the found min and max extends into variables. Then subtract the min from the max to get the size of the wrapper box.

The position can just be the position of your root parent.

1 Like

That worked. Thanks!