Entity dimensions in RealityKit

I’m loading a USDZ model using Entity.loadAsync(contentsOf:)

I’d like to get the dimensions of the model and I find that visualBounds(relativeTo: nil).extents returns dimensions larger than the actual dimensions while I see the correct dimensions when viewing the USDZ in Blender or when instantiating it as a MDLAsset(url:). What is the method to get the actual dimensions from an Entity? Thanks

Thanks

  • Deleting this question due to a mistake I was making.

Add a Comment

Accepted Reply

There is no issue with visualBounds. My entity had an unexpected child that was throwing off the dimension caculation.

Replies

There is no issue with visualBounds. My entity had an unexpected child that was throwing off the dimension caculation.