Camera Component, Editor Viewport Widget refactoring.
- Handle changing of active camera entirely inside CameraComponentController - Remove a LOT of legacy Cry things related to cameras - Add a CameraSystemComponent to handle ActiveCameraRequestBus and CameraSystemRequestBus Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
This commit is contained in:
@@ -253,7 +253,8 @@ void CViewSystem::Update(float frameTime)
|
||||
}
|
||||
}
|
||||
|
||||
m_pSystem->SetViewCamera(rCamera);
|
||||
AZ_ErrorOnce("CryLegacy", false, "CryLegacy view system no longer available (CViewSystem::Update)");
|
||||
//m_pSystem->SetViewCamera(rCamera);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,23 +558,25 @@ void CViewSystem::SetOverrideCameraRotation(bool bOverride, Quat rotation)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CViewSystem::UpdateSoundListeners()
|
||||
{
|
||||
assert(gEnv->IsEditor() && !gEnv->IsEditorGameMode());
|
||||
AZ_ErrorOnce("CryLegacy", false, "CryLegacy view system no longer available (CViewSystem::UpdateSoundListeners)");
|
||||
|
||||
// In Editor we may want to control global listeners outside of the game view.
|
||||
if (m_bControlsAudioListeners)
|
||||
{
|
||||
IView* const pActiveView = static_cast<IView*>(GetActiveView());
|
||||
TViewMap::const_iterator Iter(m_views.begin());
|
||||
TViewMap::const_iterator const IterEnd(m_views.end());
|
||||
//assert(gEnv->IsEditor() && !gEnv->IsEditorGameMode());
|
||||
|
||||
for (; Iter != IterEnd; ++Iter)
|
||||
{
|
||||
IView* const pView = Iter->second;
|
||||
bool const bIsActive = (pView == pActiveView);
|
||||
CCamera const& rCamera = bIsActive ? gEnv->pSystem->GetViewCamera() : pView->GetCamera();
|
||||
pView->UpdateAudioListener(rCamera.GetMatrix());
|
||||
}
|
||||
}
|
||||
//// In Editor we may want to control global listeners outside of the game view.
|
||||
//if (m_bControlsAudioListeners)
|
||||
//{
|
||||
// IView* const pActiveView = static_cast<IView*>(GetActiveView());
|
||||
// TViewMap::const_iterator Iter(m_views.begin());
|
||||
// TViewMap::const_iterator const IterEnd(m_views.end());
|
||||
|
||||
// for (; Iter != IterEnd; ++Iter)
|
||||
// {
|
||||
// IView* const pView = Iter->second;
|
||||
// bool const bIsActive = (pView == pActiveView);
|
||||
// CCamera const& rCamera = bIsActive ? gEnv->pSystem->GetViewCamera() : pView->GetCamera();
|
||||
// pView->UpdateAudioListener(rCamera.GetMatrix());
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user