hit2501 Posted April 23, 2017 Share Posted April 23, 2017 Hi everyone, Is there any image or similar like this where I can see how to positionate lights (hemispheric or directionals) I dont understand the three coordinates system. Sorry if this is a too "noob" question. Thank you all. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 24, 2017 Share Posted April 24, 2017 Hi hit... that is not a noob question... no need to apologize. Direction vectors are sometimes difficult to understand. But .position vectors for lights... is easy, though. It works the same as mesh .positions. With Z-facing camera (common)... X is left/right, Y is up/down, and Z is forward/backward. I will soon write a helper section in our Lights Tutorial... about directions. Perhaps I will give a copy to @JohnK for HIS Lights Tutorial, too. For now, know that there is a method: light.setDirectionToTarget(something.position) ...that will help you. Hemi lights almost always aim straight up... direction 0, 1, 0 and their .position is usually 0,0,0 (scene center) and rarely changed. SpotLights and DirectionalLights are the lights that MOST USE .setDirectionToTarget(). THEIR .position is VERY important... because their .position is used for shadows creation. PointLights also have important .position for same shadow reason, but a pointLight is ALL-direction. I am hurried now, but you can put camera and spotlight inside doubleside box... and experiment aiming spotlight with setDirectionToTarget()... and then checking console.log(spotLight.direction). You will learn direction vectors fast... when doing that. Good luck... I'll be back later. Hope this helps. GameMonetize, hit2501 and BangTao 3 Quote Link to comment Share on other sites More sharing options...
hit2501 Posted April 24, 2017 Author Share Posted April 24, 2017 Thank you very much Wingnut, setDirectionToTarget(target) is what I was looking for. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.