Made orbit and dolly functions work while following an object.
parent
010f26506b
commit
89f177fe65
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue