BLACK FRIDAY: Save 50% on all my Swift books and bundles! >>

VisionOS ModelEntity placement issue

Forums > visionOS

I am glad to see a new VisionOS forum! Back in Feb, I had posted a question about blending colors over the faces of a programmatically defined tetrahedron with RealityKit shaders, and eventually, with the help of Apple support, provide an answer in the SwiftUI forum. I'm still banging away with tetrahedra, and now want to generate very many tetrahedra (millions). I thought this part would be easy, if I could get one done correctly! However, I'm finding that with just 2 tetrahedra, even though the vertices have them as being adjacent, they are offset vertically.
I am calling a TetView struct within a ForEach loop for each of the tetrahedra. So the issue seems to be that RealityKit is interpreting each instance of a TetView as distinct and adjusting it's position within the view. I'm looking for general guidance, without knowing where to start: do I need to construct a scene outside of the TetView, or a scene (instead of just individual ModelEntities within TetView? Something simple such as being able to declare no offset? Thanks, in advance, for your suggestions.

   

Save 50% in my WWDC sale.

SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.