more updates to camera code

This commit is contained in:
hultonha
2021-04-27 19:40:45 +01:00
parent 1b946818a2
commit 64e06c3010
5 changed files with 76 additions and 30 deletions
+6 -3
View File
@@ -1633,8 +1633,8 @@ void EditorViewportWidget::keyPressEvent(QKeyEvent* event)
QCoreApplication::sendEvent(GetIEditor()->GetEditorMainWindow(), event);
}
// NOTE: we keep track of keypresses and releases explicitly because the OS/Qt will insert a slight delay between sending
// keyevents when the key is held down. This is standard, but makes responding to key events for game style input silly
// NOTE: we keep track of key presses and releases explicitly because the OS/Qt will insert a slight delay between sending
// key events when the key is held down. This is standard, but makes responding to key events for game style input silly
// because we want the movement to be butter smooth.
if (!event->isAutoRepeat())
{
@@ -2428,7 +2428,10 @@ void EditorViewportWidget::SetDefaultCamera()
return;
}
ResetToViewSourceType(ViewSourceType::None);
gEnv->p3DEngine->GetPostEffectBaseGroup()->SetParam("Dof_Active", 0.0f);
if (gEnv->p3DEngine)
{
gEnv->p3DEngine->GetPostEffectBaseGroup()->SetParam("Dof_Active", 0.0f);
}
GetViewManager()->SetCameraObjectId(m_cameraObjectId);
SetName(m_defaultViewName);
SetViewTM(m_defaultViewTM);