| 37 | bool bIsCameraSyncEnabled = false; |
| 38 | |
| 39 | void CLiveCreateCmd_SetCameraPosition::Execute() |
| 40 | { |
| 41 | if (bIsCameraSyncEnabled) |
| 42 | { |
| 43 | // prepare view parameters |
| 44 | IView* pView = GetActiveView(); |
| 45 | if (NULL != pView) |
| 46 | { |
| 47 | SViewParams params = *pView->GetCurrentParams(); |
| 48 | params.position = m_position; |
| 49 | params.rotation = m_rotation; |
| 50 | params.ResetBlending(); |
| 51 | |
| 52 | // update camera entity |
| 53 | IEntity* pCameraEntity = GetCameraEntity(); |
| 54 | if (NULL != pCameraEntity) |
| 55 | { |
| 56 | pCameraEntity->SetPos(m_position); |
| 57 | pCameraEntity->SetRotation(m_rotation); |
| 58 | } |
| 59 | |
| 60 | IViewSystem* pViewSystem = GetViewSystem(); |
| 61 | pViewSystem->SetOverrideCameraRotation(true, m_rotation); |
| 62 | pViewSystem->GetActiveView()->SetCurrentParams(params); |
| 63 | pViewSystem->GetActiveView()->ResetShaking(); |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | void CLiveCreateCmd_SetCameraFOV::Execute() |
| 69 | { |
nothing calls this directly
no test coverage detected