Is it possible to disable a specific entity's grounding shadow in RealityKit/arView

I created a plane with unlit material with png texture, and I want use it as an indicator to show users where to put models in the scene.

But if the grounding shadow is enabled, the plane is flickering with shadow and looks really weird. If the grounding shadow is disabled it works fine. But I do want other models have grounding shadow. So I wonder if I can disable this specific plane's grounding shadow, or if there is a way to solve the flickering?

Here's my code

let planeMesh = MeshResource.generatePlane(width: 0.8, depth: 0.8)
let planeAnchor = AnchorEntity(plane: .horizontal)
var material = UnlitMaterial(color: .white)
material.color.texture = try! .init(.load(named:"indicator"))
indicatorEntity = ModelEntity(mesh: planeMesh, materials: [material])
planeAnchor.addChild(indicatorEntity)
arView.scene.addAnchor(planeAnchor)
    func session(_ session: ARSession, didUpdate frame: ARFrame) {

        guard let result = self.arView.raycast(from: arView.center, allowing: .estimatedPlane, alignment: .horizontal).first else {
            return
        }

        indicatorEntity.setTransformMatrix(result.worldTransform, relativeTo: nil)

    }
Answered by Graphics and Games Engineer in 734208022

Hi, unfortunately there is no way to disable shadows per entity, feel free to file a feature request on feedback assistant for this. Thanks!

Accepted Answer

Hi, unfortunately there is no way to disable shadows per entity, feel free to file a feature request on feedback assistant for this. Thanks!

Has there been any update on this? I think that shadows should be optional per entity, especially if we start adding “magical” or “digital holographic” entities that might not want shadows.

Yes, there will be a new API to do this in visionOS.

Is this feature available now in both iOS and visionOS platform

Is it possible to disable a specific entity's grounding shadow in RealityKit/arView
 
 
Q