How to keep a plane position from camera world to project shadow

Hi all.

I have a question regarding to position of a plane. I have an object that i manipulate in 3D using ORBITCONTROLS. I have a plane under this object with a texture that represent the shadow on the floor. When i turn the object, the plane turn with it (what is ok in the main case). BUT, in one case, i would like to manipulate the object but keeping the plane under the object (view from the camera), like if i use object rotation. But i need to keep orbitcontrols. So, is it a way to calculate the position of this plane to stay on the bottom of the screen like if only the object was turned in the space but not the camera ? Thanks for your help !

Yes. Read the description of OrbitConrols and you will see that you can get the azimuth and polar angles. If the object is at position 0,0,0. you should be able to easily compute the required rotation for the plane. Note that, if you want to keep the shadow in the same place, you will also have to adjust the position of the light source.

Thanks a lot Phil, i’ll try to use it…