You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But there is a much easier way that makes more sense: make the directional light a child of the camera, and make sure the camera is added to the scene. So removing that from the draw() method, we would instead replace the this in the constructor,
I assume the reason for this is so that the directional light's shadow projection frustum moves with the camera, so objects that are in range of the camera always have the directional light. That's the only one I could think of.
k-aguete
pushed a commit
to k-aguete/ros3djs
that referenced
this issue
Oct 21, 2022
ros3djs/src/visualization/Viewer.js
Line 131 in 530f7ec
This is how:
But there is a much easier way that makes more sense: make the directional light a child of the camera, and make sure the camera is added to the scene. So removing that from the
draw()
method, we would instead replace the this in theconstructor
,with this,
. Now the light will move wherever the camera goes, without having to do any procedure to sync one matrix to the other.
The text was updated successfully, but these errors were encountered: