Post

Replies

Boosts

Views

Activity

Reply to Non-convex collision?
so... If you have a ModelEntity, you can get the .model which contains a mesh (https://developer.apple.com/documentation/realitykit/modelcomponent/mesh) The mesh contains this contents struct (https://developer.apple.com/documentation/realitykit/meshresource/contents-swift.struct) , and eventually all the way down to the MeshResource.Part parts (https://developer.apple.com/documentation/realitykit/meshresource/part). Then you start to have index / triangle data. By this point I feel pretty in-over-my-head.... What has worked is simply going into my scene in RealityComposer and creating a bunch of cubes with collision / physics, and placing them around the model / setting a transparent material. If you're willing to spend 3 hours lining your scene with cubes manually, this does work for simple concave-ish geometries. There has to be a better solution...
Mar ’24