I'm trying to create a feature in my app vision OS app where i show a reality view and on button click toggle different entities as in showing them on button click and vice versa.
Is this possible in Vision os? if so how can i do this ?
All that I did now was to instanciate my scene which contains a car 3d model, red tyres and blue tyres.
On a button click i'm trying to show the blue tyres instead of the red ones.
Is this possible ?
Thank you,
Post
Replies
Boosts
Views
Activity
I been playing around with VisionOS and currently trying to play with Audio, but somehow following the steps in wwdc isn't working for me.
what I'm trying to do is to play audio when you navigate to a certain view.
Currently in wwdc, they're doing this to programmatically set up audio
let audioSource = Entity()
audioSource.spatialAudio = SpatialAudioComponent(directivity: .beam(focus: 0.75))
audioSource.orientation = .init(angle: .pi, axis: [0, 1 , 0])
if let audio = try? await AudioFileResource(named: "audioFile",
configuration: .init(shouldLoop: true)) {
}
But I'm getting these errors and cannot proceed
'AudioFileResource' cannot be constructed because it has no accessible initializers
I couldn't quite follow on how to do it from Reality Composer pro either.. therefore I'm stuck.
Any help is really appreciated.
I been trying to learn SwiftUI and was wondering on how I can achieve this kind of effect, the one in the background, I have tried using many methods but I couldn't manage to recreate it.
I'd appreciate your help if you have any input.
Reference Image:
https://www.imgpaste.net/image/K3JfVN