Commit e0f6c689 authored by Oliver Bock's avatar Oliver Bock

Fixed camera positioning (solves amplitude-out-of-range issue)

parent 1a605d11
......@@ -460,7 +460,7 @@ void PulsarAnimationWidget::mouseReleaseEvent(QMouseEvent *event)
void PulsarAnimationWidget::updateCameraPosition(const int angleH, const int angleV, const double zoom)
{
m_cameraPosX = sin(angleH * deg2rad) * zoom;
m_cameraPosX = sin(angleH * deg2rad) * cos(angleV * deg2rad) * zoom;
m_cameraPosY = sin(angleV * deg2rad) * zoom;
m_cameraPosZ = cos(angleH * deg2rad) * cos(angleV * deg2rad) * zoom;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment