Cancel follow anchor node rotation interpolation when the anchor is changed

This commit is contained in:
Emil Axelsson
2019-08-13 18:35:22 +02:00
parent 4ab094e681
commit e06993332c
5 changed files with 49 additions and 29 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ datamessagestructures::CameraKeyframe ExternInteraction::generateCameraKeyframe(
//kf._position = global::navigationHandler.camera()->positionVec3();
kf._position = navHandler.orbitalNavigator().anchorNodeToCameraVector();
kf._followNodeRotation = navHandler.orbitalNavigator().followingNodeRotation();
kf._followNodeRotation = navHandler.orbitalNavigator().followingAnchorRotation();
if (kf._followNodeRotation) {
kf._position = glm::inverse(focusNode->worldRotationMatrix()) * kf._position;
kf._rotation = navHandler.orbitalNavigator().anchorNodeToCameraRotation();