I have come into a problem recently when trying to rotate 3D objects. I am building a GUI and I have a separate figure where an object is plotted. In the figure, I allow the user to use MATLAB's built-in rotate button to move the object around. However, I am unable to have the light also follow the rotation as it seems to be fixed on one part of the object. To create the light, I am using
c=camlight('right');
set(c,'style','infinite'); …Run Code Online (Sandbox Code Playgroud)