How to use a transformation controller to control the rotation of light helper objects

By default, the controller can be used, and the position and direction of the light change when dragging. Now, I want to click on rotation to change the direction of the light, keeping the position unchanged. When translating, I only change the position of the light without changing the direction. How can I modify the Helper to achieve this?

Depends on what kind of light it is - some lights don’t have a direction and use target for positioning instead, in which case you’d need to rotate target around the light position when user is applying the light rotation.




I don’t understand why the second situation occurs. In the scene, there are only two cubes and one parallel light, and all lights and objects have already turned on shadow generation and reception. The target is at the origin, and the light source is located to the left of the two cubes. If the light is in a wireless distance and directly points to the left, it illuminates the large cube. The small cube should be blocked by the large cube and should produce shadows. Why is it still lighting up? If the light is at the position indicated by the helper and emits light to the left, why are the faces of both cubes glowing


I can understand the first situation, where the small cube is blocked by the large cube, so the surface is black, but how to explain the second situation?