Rotating with orbital interaction mode.

This commit is contained in:
Kalle Bladin
2016-05-24 13:26:07 -04:00
parent f438535579
commit 09ca260778
6 changed files with 215 additions and 39 deletions

View File

@@ -89,7 +89,7 @@ void MouseController::trackballRotate(int x, int y) {
if (curTrackballPos != _lastTrackballPos) {
// calculate rotation angle (in radians)
float rotationAngle = glm::angle(curTrackballPos, _lastTrackballPos);
rotationAngle *= static_cast<float>(_handler->deltaTime()) * 100.0f;
//rotationAngle *= static_cast<float>(_handler->deltaTime()) * 100.0f;
// Map trackballpos to camera
// glm::vec3 trackballMappedToCamera = mapToCamera(_lastTrackballPos - curTrackballPos);