Make the co-rotation dependent on the bounding sphere rather than interaction sphere (closes #3017)

This commit is contained in:
Alexander Bock
2024-02-15 11:19:41 +09:00
parent de5a4352ec
commit f9a01d507e

View File

@@ -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 =