The command "/vis/viewer/set/lightsMove cam" is supposed to cause the light source to move with the camera. Looking at the function that handles this command G4ViewParameters::SetViewAndLights, one should be able to set "/vis/viewer/set/lightsVector 0 0 1" to have lights always pointing at the target from the camera's location. It doesn't work because there is a typo at L. 268 in version 10.7 https://geant4.kek.jp/lxr/source/visualization/management/src/G4ViewParameters.cc?v=10.7.p3#L269 269 fRelativeLightpointDirection.x () * zprime; which should be 269 fRelativeLightpointDirection.z () * zprime;
Hi, Good catch, I'll fix it and it will be available in next patch release. Thanks, Laurent