Hi Guys, I've been trying to put my model to react to light in visionOS Simulator by editing the component in Reality Composer Pro and also modifying it by code, but I can only put the shadow if I put it as an usdz file, it's not as reflective as when I see it on reality converter or reality composer pro, does someone have this problem too?
RealityView { content in
if let bigDonut = try? await ModelEntity(named: "bigdonut", in: realityKitContentBundle) {
print("LOADED")
// Create anchor for horizontal placement on a table
let anchor = AnchorEntity(.plane(.horizontal, classification: .table, minimumBounds: [0,0]))
// Configure scale and position
bigDonut.setScale([1,1,1], relativeTo: anchor)
bigDonut.setPosition([0,0.2,0], relativeTo: anchor)
// Add the anchor
content.add(anchor)
// Enable shadow casting but this does not work
bigDonut.components.set(GroundingShadowComponent(castsShadow: true))
}
}