Where should I be declaring and starting a Spatial Tracking Session? Is it inside a RealityView? I didn't need to start a spatial tracking session earlier when I wanted to make just object tracking work (I just needed to follow the steps to create the transform, add the anchoring component and make the target as the reference object). Do I now need to start the Spatial Tracking Session in order to accomplish this new feature that I am trying?
Post
Replies
Boosts
Views
Activity
So I have 2 objects I am tracking (with 2 anchor entities created) - Anchor1 and Anchor2. I am spawning Entity1 on Anchor1 and Entity2 on Anchor2 once both the Anchors are detected. I want to attach collision boxes around Entity1 and Entity2 and detect a collision when Entity1 collides with Entity2.
I have used what you recommended and changed the physics simulation property of both Anchor1 and Anchor2 to be None, but this causes Entity1 and Entity2 to spawn elsewhere, not on the object anchor.
Thanks for your response, I have used what you said but the object detection doesn't seem to work properly once I change the physics simulation properties of the anchor entity to which I am adding digital content. The digital content that I am attaching to the reference objects are not spawning in the correct locations that I have created in RCP for some reason.
if let transform1 = immersiveContentEntity.findEntity(named: "AnchorEntity1") as? AnchorEntity,
is the line of code I am using.
I'm adding my code as a reply to the OP below due to character limitations - any help you can provide me would be really nice! Thanks
Hi, thanks for this!
So I'm doing the object tracking from inside Reality Composer Pro without actually starting a Spatial Tracking Session - so if I've to do all of this from inside Xcode, I'm not exactly sure how to go about this, can you help me with figuring that out with some sample code?
So I start a spatial tracking session inside my reality view that I call in Xcode which points me to the scene where I have added the Anchor entities (with the target object being the reference objects)?
Recommended by third parties I guess..
Is there any sort of antivirus software that comes baked in when I have macOS Sequoia installed on the MacBook Pro? Are there any Norton/McAfee etc. that have a compatible version of their antivirus software that I can instead install on macOS Sequoia?