Made orbit and dolly functions work while following an object.

pull/3/head
Chris Laurel 2001-03-19 21:24:09 +00:00
parent 010f26506b
commit 89f177fe65
1 changed files with 6 additions and 0 deletions

View File

@ -673,6 +673,9 @@ void Simulation::orbit(Quatf q)
v *= distance;
observer.setPosition(focusPosition + v);
if (observerMode == Following)
followInfo.offset = v * astro::lightYearsToKilometers(1.0);
}
}
@ -701,6 +704,9 @@ void Simulation::changeOrbitDistance(float d)
double newDistance = minOrbitDistance + naturalOrbitDistance * exp(log(r) + d);
v = v * (newDistance / currentDistance);
observer.setPosition(focusPosition + v);
if (observerMode == Following)
followInfo.offset = v * astro::lightYearsToKilometers(1.0);
}
}
}