Skip to content

Commit d6a3bf6

Browse files
committed
Bug fix for https://bugs.launchpad.net/or/+bug/1944725 Switching 3D cab the camera position is incorrect.
1 parent 6b896db commit d6a3bf6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/RunActivity/Viewer3D/Cameras.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1866,8 +1866,9 @@ protected override void SetCameraCar(TrainCar car)
18661866
// View is only reset on move to a different cab or "Ctl + 8".
18671867
if (attachedCar.CabViewpoints != null)
18681868
{
1869-
if (ActViewPoint != prevViewPoint)
1869+
if (car.CarID != prevcar || ActViewPoint != prevViewPoint)
18701870
{
1871+
prevcar = car.CarID;
18711872
prevViewPoint = ActViewPoint;
18721873
viewPointLocation = attachedCar.CabViewpoints[ActViewPoint].Location;
18731874
viewPointRotationXRadians = attachedCar.CabViewpoints[ActViewPoint].RotationXRadians;

0 commit comments

Comments
 (0)