0 Replies
      Latest reply on Oct 30, 2019 7:31 PM by skypu3
      skypu3 Level 1 Level 1 (0 points)

        Hello,

         

        I found I can't let shadows work on entity with reality file or usdz, but it works on entity with reality composer.

         

        Here is the code snippet:

        //no shadows
          penguin = try? Entity.loadModel(named: "penguin", in: nil)
          penguinAnchor.addChild(penguin!)
        
        //shadows
          penguinScene = try! PenguinRC.loadPenguinScene()
          arView.scene.addAnchor(penguinScene)

         

        And I had tried with PointLightComponent.Shadow with following code, but it still can't work.

        model.components[DirectionalLightComponent.Shadow.self] = DirectionalLightComponent.Shadow.init()

         

        So how can I enable shadows on the model ?

         

        Thanks