mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-23 05:19:18 -06:00
Make the co-rotation dependent on the bounding sphere rather than interaction sphere (closes #3017)
This commit is contained in:
@@ -1247,11 +1247,11 @@ bool OrbitalNavigator::shouldFollowAnchorRotation(const glm::dvec3& cameraPositi
|
||||
const glm::dvec3 cameraPositionModelSpace = glm::dvec3(inverseModelTransform *
|
||||
glm::dvec4(cameraPosition, 1.0));
|
||||
|
||||
const SurfacePositionHandle positionHandle =
|
||||
_anchorNode->calculateSurfacePositionHandle(cameraPositionModelSpace);
|
||||
const glm::dvec3 centerToReference =
|
||||
glm::normalize(cameraPositionModelSpace) * _anchorNode->boundingSphere();
|
||||
|
||||
const double maximumDistanceForRotation = glm::length(
|
||||
glm::dmat3(modelTransform) * positionHandle.centerToReferenceSurface
|
||||
glm::dmat3(modelTransform) * centerToReference
|
||||
) * _followAnchorNodeRotationDistance;
|
||||
|
||||
const double distanceToCamera =
|
||||
|
||||
Reference in New Issue
Block a user