How do I make a 3D bounding box on a SkinnedMesh object in Unity?

Viewed 180

I need to make a 3D bounding box around a SkinnedMesh renderer object for Unity. I need to print the vertices to the screen or a JSON file for export. Would you happen to know the key steps or even offer a code snippet for the bounding box part. I can figure out how to get the data out of the engine.

Thanks for the help!

Brian

1 Answers

I've looked around the documentation and found out that the SkinnedMeshRenderer class already has the bounds property, meaning that you probably only need to access it without having to create it.

Also in the Mesh.bounds and Renderer.Bounds documentations, there are a couple of snippets I belive could be helpful.

Related