Relative Content

Tag Archive for swiftuihittestscnscenerenderer

SCNSceneRenderer hitTest finds hit only once

My SwiftUI app renders a SCNScene with the code below. The scene displays visible nodes that can be tapped to show an info.
When a tap to a node ends, hitTest of the renderer (saved in the viewModel) is called. It returns the tapped node and sets isShowingVehicleInfo so that the MainView shows the VehicleInfoView above the Board3DView.