fixed camera control,

removed test exe
This commit is contained in:
Anakin
2017-02-05 12:34:24 +01:00
parent a07d8acbec
commit 2d335474bf
6 changed files with 79 additions and 39 deletions

View File

@@ -278,6 +278,26 @@ void OglViewerWidget::keyPressEvent(QKeyEvent *e)
}
}
void OglViewerWidget::keyReleaseEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_W || e->key() == Qt::Key_S)
{
emit m_camera->wheelAction(0);
if (m_light.headlight)
updateLightPosition();
update();
}
else if (e->key() == Qt::Key_A || e->key() == Qt::Key_D)
{
emit m_camera->moveAction(QVector2D(0, 0));
if (m_light.headlight)
updateLightPosition();
update();
}
}
void OglViewerWidget::dragEnterEvent(QDragEnterEvent *e)
{
if (e->mimeData()->hasUrls())