Reputation: 21
I'm using PointLight in my ThreeJs project. I need to make it point to the oriented direction in the image below, but I can't change it. below the code
const light = new THREE.PointLight( 0xffffff, 0.01, 40 );
light.position.set( 0, 0, 30 );
//light.rotateY(270); did not work
light.castShadow = true;
scene.add( light );
Upvotes: 1
Views: 465
Reputation: 28472
PointLight
doesn't really have a rotation. It acts as a source of light emanating from a single point, and it shines equally in all directions. Think of it as a star, no matter which way it rotates, it still shines in all directions.
If you need a light that does respond to rotation, you might want to consider a SpotLight
or a DirectionalLight
. See the image below for a visual representation:
Upvotes: 2