2 thoughts on “Is it possible to point a DirectionalLight at anything but (0,0,0) ?

  1. Yes, DirectionalLight shines in the direction of vector from its position to the position of its target:

    var light = new THREE.DirectionalLight( 0xffffff );
    light.position.set( fromX, fromY, fromZ );
    light.target.position.set( toX, toY, toZ );

    Or you can set target to be something from the scene graph:

    light.target = myObject;

    Though all direction vector settings have equivalent to some unit vector pointing to (0,0,0).

  2. I’m not sure I understand what do you want to achieve.

    Do you know what is directional light? It is light that shines in a constant direction everywhere in the space.


    The only thing that matters for directional light is the orientation of the surface normal with respect to the light direction. It doesn’t matter where in the space are both object and light.

Comments are closed.