I have an interactive globe built with SceneKit. The globe is a SCNNode and the dots that represent land are also SCNNodes and are children of the globe. I want to add a custom view as the geometry for one of the children of the globe. I know how to add a node with a spherical geometry and change its color and so on. Im not sure how to use a custom view (swift ui) for the geometry of a node.
let lowerCircle = SCNSphere(radius: dotRadius * 5)
lowerCircle.firstMaterial?.diffuse.contents = GenericColor(cgColor: UIColor.white.cgColor)
lowerCircle.firstMaterial?.lightingModel = SCNMaterial.LightingModel.constant
let dotNode = SCNNode(geometry: lowerCircle)
dotNode.name = "NewYorkDot"
dotNode.position = textureMap[i].position
positions.append(dotNode.position)
dotNodes.append(dotNode)