added MoveCamera but isn't working well
updated about text,
This commit is contained in:
@@ -235,6 +235,38 @@ void OglViewerWidget::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
resetView();
|
||||
}
|
||||
else if (e->key() == Qt::Key_W)
|
||||
{
|
||||
emit m_camera->wheelAction(1);
|
||||
|
||||
if (m_light.headlight)
|
||||
updateLightPosition();
|
||||
update();
|
||||
}
|
||||
else if (e->key() == Qt::Key_S)
|
||||
{
|
||||
emit m_camera->wheelAction(-1);
|
||||
|
||||
if (m_light.headlight)
|
||||
updateLightPosition();
|
||||
update();
|
||||
}
|
||||
else if (e->key() == Qt::Key_A)
|
||||
{
|
||||
emit m_camera->moveAction(QVector2D(0, -1));
|
||||
|
||||
if (m_light.headlight)
|
||||
updateLightPosition();
|
||||
update();
|
||||
}
|
||||
else if (e->key() == Qt::Key_D)
|
||||
{
|
||||
emit m_camera->moveAction(QVector2D(0, 1));
|
||||
|
||||
if (m_light.headlight)
|
||||
updateLightPosition();
|
||||
update();
|
||||
}
|
||||
else if (e->key() == Qt::Key_Escape)
|
||||
{
|
||||
parentWidget()->close();
|
||||
|
||||
Reference in New Issue
Block a user