This is how my model looks like and it's collision shapes (pink color).
My problem with this is that when I try to tap on the bottommost part of my model (the circle), I can't do that, because the uppermost part of the model's CollisionShape is in the way.
This is how i tried to create an accurate collisionShape for my model:
@objc private func placeObject() {
let entity = try! Entity.load(named: "Laryngeal")
let geom = entity.findEntity(named: "Geom")
for children in geom!.children {
let childModelEntity = children as! ModelEntity
childModelEntity.collision = CollisionComponent(shapes: [ShapeResource.generateConvex(from: childModelEntity.model!.mesh)])
}
let modelEntity = ModelEntity()
modelEntity.addChild(entity)
let anchorEntity = AnchorEntity(plane: .horizontal)
anchorEntity.addChild(modelEntity)
arView.installGestures([.all],for: modelEntity)
arView.scene.addAnchor(anchorEntity)
}
So my question is, how can i create the most accurate collisionShape which perfectly fits my model?