Problem 2460

Summary: /vis/viewer/set/lightsMove cam doesn't work right
Product: Geant4 Reporter: Ben Loer <ben.loer>
Component: visualizationAssignee: Laurent Garnier <laurent.garnier>
Status: ASSIGNED ---    
Severity: minor CC: garnier
Priority: P4    
Version: 10.7   
Hardware: All   
OS: All   

Description Ben Loer 2022-01-04 00:12:02 CET
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;
Comment 1 garnier 2022-01-10 12:05:51 CET
Hi, 

Good catch, I'll fix it and it will be available in next patch release.
Thanks, 

Laurent