Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch anchorUpdate.event {
- let anchor = anchorUpdate.anchor
- case .added:
- if let persistedEntity = worldAnchors[anchor.id] {
- // create the entity using the persisted data to choose your model
- // here it goes an example for the String as the filename of the 3d model
- var entity = Entity(named: worldAnchors[anchor.id])
- entity.position = anchor.originFromAnchorTransform.columns.3.xyz
- entity.isEnabled = anchor.isTracked
- rootEntity.addChild(entity)
- }
- // rest of the cases
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement