Post

Replies

Boosts

Views

Activity

Reply to RealityKit - Change Material Color or other properties in RealityView
@Vision Pro Engineer thanks for this, it helped a lot! For me and maybe it's because I was using a primitive from Reality Composer Pro, my entity's structure was a bit different: ⟐ SynchronizationComponent ⟐ CollisionComponent ⟐ InputTargetComponent ⟐ Transform ▿ 'usdPrimitiveAxis' : ModelEntity ⟐ SynchronizationComponent ⟐ ModelComponent ⟐ Transform So to get the model component I would have used: var model = cube.children.first?.components[ModelComponent.self] or also use this to get the index: let index = cube.children.firstIndex(where: { $0.name == "usdPrimitiveAxis"}) and then use that to get the reference from the children set
Oct ’24