Fixes #59
This commit is contained in:
@@ -82,11 +82,17 @@ void EditorSystem::Update(double dt)
|
|||||||
void EditorSystem::Enable()
|
void EditorSystem::Enable()
|
||||||
{
|
{
|
||||||
m_EditorCameraInputController->Enable();
|
m_EditorCameraInputController->Enable();
|
||||||
|
|
||||||
m_EventBroker->Publish(Events::UnlockMouse());
|
m_EventBroker->Publish(Events::UnlockMouse());
|
||||||
Events::SetCamera e;
|
|
||||||
e.CameraEntity = m_EditorCamera;
|
// Enable editor camera
|
||||||
m_EventBroker->Publish(e);
|
Events::SetCamera eSetCamera;
|
||||||
(glm::vec3&)m_EditorCamera["Transform"]["Position"] = Transform::AbsolutePosition(m_ActualCamera);
|
eSetCamera.CameraEntity = m_EditorCamera;
|
||||||
|
m_EventBroker->Publish(eSetCamera);
|
||||||
|
if (m_ActualCamera.Valid()) {
|
||||||
|
(glm::vec3&)m_EditorCamera["Transform"]["Position"] = Transform::AbsolutePosition(m_ActualCamera);
|
||||||
|
}
|
||||||
|
|
||||||
m_Enabled = true;
|
m_Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user