Hi,
In my render window I have 2 actors, a little red sphere and a brain surface, the sphere takes different positions on the brain surface in each render.
I need to change the orientation of the camera depending on the position of the sphere to see the right (good) side of the brain where the sphere is.
I managed to change the orientation of the camera using the setDirectionOfProjection function but I don’t know the right value to give.
You can check the highest normalized vector component value of the vector contructed from the center to the red sphere.
if the center of the brain is [10,10,10], and the red sphere is [20,-3,9], the vector is [10,-13,-1], and something like [0.6, -0.7,-0.1], hence the highest normalized vector component value is -0.7, and the camera should be looking in [0,1,0], aka +Y.