Bitbybit Docs
    Preparing search index...

    Class BabylonShadowLight

    Adjusting lights that cast shadows, the point, directional and spot lights, after they were created: aim them at a target or move them, and the shadows follow.

    Index

    Constructors

    set

    • Aims a shadow-casting light at a point in the scene, turning its direction to point from its position toward target.

      Parameters

      Returns void

      bitbybit.babylon.lights.shadowLight.setDirectionToTarget({ shadowLight: sun, target: [0, 0, 0] });
      
    • Moves a shadow-casting light to a point in the scene; for a directional light the position sets where its shadows are computed from.

      Parameters

      Returns void

      bitbybit.babylon.lights.shadowLight.setPosition({ shadowLight: sun, position: [50, 100, 50] });