Post

Replies

Boosts

Views

Activity

Reply to Playing Animation using visionOS - Reality Composer Pro - USDZ
Hey there! To play a model's animation, you have to store the animation on your model as an Animation Resource and then pass that into the .playAnimation method. let animScene = try await Entity(named: "anim", in: realityKitContentBundle) guard let animModel = animScene.findEntity(named: "anim") else { return } guard let animResource = animModel.availableAnimations.first else { return } let anim = try AnimationResource.generate(with: animResource.repeat().definition) animModel.playAnimation(anim) Make note, you can only play the first available animation on a .usdz file at the moment. If you want to play multiple animations, you have to either load in separate .usdz files that have the animations you want to store as Animation Resources, or create Animation Clips as shown in the WWDC 21 video "Dive into Reality Kit 2"
Oct ’23
Reply to How to place a 3D model in front of you in the Full Space app.
Hey @sadaotokuyama ! Tassilo von Gerlach made a good video about using anchor entities that attach to the .head I'm wondering if you could have some way of capturing the coordinates of .head when you need to and updating the position of the entity when the action occurs? https://www.youtube.com/watch?v=NZ-TJ8Ln7NY&pp=ygUSYXNzaWxvIHZvbiBHZXJsYWNo Would love to follow the progress on this as I've thought about how I would go about creating something similar. Good luck!
Oct ’23
Reply to Adding custom Simulated Scenes to Apple Vision Pro Simulator
This would be awesome, please do update here if you find a way to do this! I haven't seen anybody do this so far, but the hacky solution I would suggest if this is not currently possible is to load in your desired model at room scale into the museum scene and hope it doesn't clip with any of the walls around it. The benches would probably be the only thing you would still see. Alternatively, you could load your desired room scale model with .setPosition to something like x=50 so that it loads outside of the simulated environment and then you could walk over to that model instead lol. Hacky but might be the easiest solution to get this up and running quickly
Oct ’23
Reply to With RealityKit in visionOS, is it possible to display floating views near entities?
Does the RealityView attachment closure not satisfy what you're trying to achieve? I wrote these notes on the WWDC video that explains the attachment closure, but I know it is a bit outdated as they made a significant update to the way the attachment closure works in the latest RealityView protocol. Hopefully this is a helpful start though https://www.wwdcnotes.com/notes/wwdc23/10081/
Oct ’23
Reply to Switching between immersive spaces
I'm completely new to SwiftUI and building in the apple ecosystem, so apologies if this doesn't help as I'm not fully sure why it would, but in my function I'm calling { await dismissImmersiveSpace() switch await openImmersiveSpace(id: "MyFullSpace") { case .opened: myFullSpaceIsShown = true case .userCancelled: return case .error: return @unknown default: return } Perhaps the switch await will solve it?
Aug ’23