I still couldn't get shadows working for usdz models, but grounding shadow does work for procedural meshes generated using code like the following:
let sphereEntity = ModelEntity(mesh: MeshResource.generateSphere(radius: 0.05), materials: [SimpleMaterial(color: .blue, roughness: 0, isMetallic: true)])
sphereEntity.setPosition([0, 0.1, 0], relativeTo: root)
sphereEntity.components.set(GroundingShadowComponent(castsShadow: true))
sphereEntity.components.set(TraceComponent(anchor: root, width: 1))
Topic:
Graphics & Games
SubTopic:
RealityKit
Tags: