Skip to content

Instantly share code, notes, and snippets.

@eospi
Created August 18, 2019 18:06
Show Gist options
  • Save eospi/2685b499c763228ebbee194a0f27ee00 to your computer and use it in GitHub Desktop.
Save eospi/2685b499c763228ebbee194a0f27ee00 to your computer and use it in GitHub Desktop.
let _ = arView.trackedRaycast(from: arView.center, allowing: .existingPlaneInfinite, alignment: .horizontal, updateHandler: { results in
guard let result = results.first else { return }
let anchor = AnchorEntity(raycastResult: result)
anchor.addChild(entity)
self.arView.scene.addAnchor(anchor)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment