8000 Add "ARParticipantAnchor" process · 1901drama/ARKit-Invader@24ceac0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 24ceac0

Browse files
committed
Add "ARParticipantAnchor" process
1 parent 9ba18ff commit 24ceac0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ARKit-Invader/Menu/CollaborativeSessions_ViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ class CollaborativeSessions_ViewController: UIViewController, ARSCNViewDelegate,
6565
node.addChildNode(sceneNode)
6666
}
6767
}
68+
69+
if anchor is ARParticipantAnchor {
70+
guard let scene = SCNScene(named: "invaderC.scn",inDirectory: "art.scnassets") else { return }
71+
let participantNode = (scene.rootNode.childNode(withName: "invaderC", recursively: false))!
72+
node.addChildNode(participantNode)
73+
}
6874
}
6975

7076
func session(_ session: ARSession, didOutputCollaborationData data:ARSession.CollaborationData) {
29.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)
0