Posts

Post marked as solved
2 Replies
maxxfrazer,I thank you for your insight.maxxfrazer stated:Yes, using scene.anchors.append(myAnchor) has the same effect, and has the added bonus of being able to add multiple independent anchors at the same time by using scene.anchors.append(contentsOf: [Scene.AnchorCollection.Element]).very insightful indeed...Bingo! I agrree scene.addAnchor() seem like the nice looking way to achive the same way. But I tend to like to read the code in long form, it helps me learn to "read" the API documentation. P.S maxxfrazer :please see updated information in form question about why frame set to zero in arkit.frame(.zero)https://forums.developer.apple.com/thread/130614Thank you again and have fun coding in RealityKitWe all learn by sharing what we knowSmartdog
Post marked as solved
2 Replies
Maxxfrazer,Thank you for taking the time to respond and impart some valuable information.I have investigated further the question at hand:Question:In the default template for Augmented Reality App, if you set content technology to "RealityKit" and User Interface "SwiftUI", why is arView "frame" parameter set to ".zero"?arView = ARView(frame: .zero)I believe a person named "Asperi"has a give an answer that desirve to be inspected, in my opinion:Asperi states in this post"The frame does not matter at UIView creation time (ie. in makeUIView), because constructed view will be resized according to final layout in container view and resulting frame will be passed in UIView.draw."I'm inclined to mark this as the correct answer. Maxxfrazer or anyone else think this may be the answer , please feel free to mark this as the answer. SmartdogWe all learn by sharing what we know
Post marked as solved
2 Replies
Bobjt,Thank you for the quick respons. Very kind of you to answer.I think you put me on the correct track :-)I surmised that it was being used similar to the usage of a convenience function. 'A convenience function is a non-essential subroutine in a programming library or framework which is intended to ease commonly performed tasks." Source Wikipedia Thank you for taking the time to answerSmartdogWe all learn by sharing what we know