Fetching an accessory's mesh size

Is it possible to find the size of a SpecialMesh? Obviously you can find the Scale property, however in a lot of Roblox’s accessories in the catalog their meshes are much larger than the Handles that they’re put inside of. I’m currently trying to make a 3D inventory in my game Case Clicker & automatically zoom out the camera for the Viewport Frame based on how large the item is, however a lot of times I find the camera is inside of some objects. Is there any way to find the size (or bounding box) of a mesh? I was thinking about maybe instancing a MeshPart and grabbing its size, however that can’t be done in real-time like i’d like to.

3 Likes

Currently, no. It’s even quite labor intensive to do it offline because you can’t get the true extents of a SpecialMesh, nor can you set the MeshId of a MeshPart and measure that (not at runtime, but not even from the Studio command line or a plugin!). You can manually create a MeshPart with the mesh id, but this is only practical for one-offs, you can’t automate it.

I had the same problem trying to frame characters in my avatar editor based on the size of their character: wings and hats can’t always be measured. I didn’t want to hand-build and maintain metadata tables for all catalog accessories, so instead I just size based on typical “large wings”, and just accept that there are some outliers like the Wings of Duality for which the allowance is not generous enough.

3 Likes