Fixed some camera resizing issues
This commit is contained in:
parent
b499d5fc55
commit
603470eeb6
|
@ -1,16 +1,16 @@
|
|||
[Window][MainStatusBar]
|
||||
Pos=0,1060
|
||||
Size=1920,20
|
||||
Pos=0,1389
|
||||
Size=2547,20
|
||||
Collapsed=0
|
||||
|
||||
[Window][SHEditorMenuBar]
|
||||
Pos=0,48
|
||||
Size=1920,1012
|
||||
Size=2547,1341
|
||||
Collapsed=0
|
||||
|
||||
[Window][Hierarchy Panel]
|
||||
Pos=0,142
|
||||
Size=650,918
|
||||
Pos=0,172
|
||||
Size=571,1217
|
||||
Collapsed=0
|
||||
DockId=0x00000004,0
|
||||
|
||||
|
@ -20,29 +20,29 @@ Size=400,400
|
|||
Collapsed=0
|
||||
|
||||
[Window][Inspector]
|
||||
Pos=1649,48
|
||||
Size=271,1012
|
||||
Pos=2276,48
|
||||
Size=271,1341
|
||||
Collapsed=0
|
||||
DockId=0x00000006,0
|
||||
|
||||
[Window][Profiler]
|
||||
Pos=0,48
|
||||
Size=650,92
|
||||
Size=571,122
|
||||
Collapsed=0
|
||||
DockId=0x00000003,0
|
||||
|
||||
[Window][Viewport]
|
||||
Pos=652,48
|
||||
Size=995,1012
|
||||
Pos=573,48
|
||||
Size=1701,1341
|
||||
Collapsed=0
|
||||
DockId=0x00000002,0
|
||||
|
||||
[Docking][Data]
|
||||
DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=8,79 Size=1920,1012 Split=X
|
||||
DockSpace ID=0xC5C9B8AB Window=0xBE4044E9 Pos=8,79 Size=2547,1341 Split=X
|
||||
DockNode ID=0x00000005 Parent=0xC5C9B8AB SizeRef=1992,1036 Split=X
|
||||
DockNode ID=0x00000001 Parent=0x00000005 SizeRef=650,1036 Split=Y Selected=0x1E6EB881
|
||||
DockNode ID=0x00000001 Parent=0x00000005 SizeRef=571,1036 Split=Y Selected=0x1E6EB881
|
||||
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=225,94 Selected=0x1E6EB881
|
||||
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=225,940 Selected=0xE096E5AE
|
||||
DockNode ID=0x00000002 Parent=0x00000005 SizeRef=995,1036 CentralNode=1 Selected=0x13926F0B
|
||||
DockNode ID=0x00000002 Parent=0x00000005 SizeRef=1074,1036 CentralNode=1 Selected=0x13926F0B
|
||||
DockNode ID=0x00000006 Parent=0xC5C9B8AB SizeRef=271,1036 Selected=0xE7039252
|
||||
|
||||
|
|
|
@ -15,15 +15,15 @@ namespace SHADE
|
|||
SHVec3 target{ 0.0f,0.0f,-1.0f };
|
||||
SHVec3 up = { 0.0f,1.0f,0.0f };
|
||||
|
||||
target += camera.position;
|
||||
|
||||
//SHVec3::RotateY(target, SHMath::DegreesToRadians(camera.yaw));
|
||||
//SHVec3::RotateX(target, SHMath::DegreesToRadians(camera.pitch));
|
||||
SHVec3::RotateY(target, SHMath::DegreesToRadians(camera.yaw));
|
||||
SHVec3::RotateX(target, SHMath::DegreesToRadians(camera.pitch));
|
||||
target += camera.position;
|
||||
////SHVec3::RotateZ(target, SHMath::DegreesToRadians(camera.roll));
|
||||
|
||||
//target = SHVec3::Normalise(target);
|
||||
|
||||
//SHVec3::RotateZ(up, camera.roll);
|
||||
SHVec3::RotateZ(up, camera.roll);
|
||||
up = SHVec3::Normalise(up);
|
||||
|
||||
|
||||
|
@ -92,15 +92,15 @@ namespace SHADE
|
|||
SHVec3 target{ 0.0f,0.0f,-1.0f };
|
||||
SHVec3 up = { 0.0f,1.0f,0.0f };
|
||||
|
||||
target += camera.position;
|
||||
|
||||
//SHVec3::RotateY(target, SHMath::DegreesToRadians(camera.yaw));
|
||||
//SHVec3::RotateX(target, SHMath::DegreesToRadians(camera.pitch));
|
||||
SHVec3::RotateY(target, SHMath::DegreesToRadians(camera.yaw));
|
||||
SHVec3::RotateX(target, SHMath::DegreesToRadians(camera.pitch));
|
||||
target += camera.position;
|
||||
////SHVec3::RotateZ(target, SHMath::DegreesToRadians(camera.roll));
|
||||
|
||||
//target = SHVec3::Normalise(target);
|
||||
|
||||
//SHVec3::RotateZ(up, camera.roll);
|
||||
SHVec3::RotateZ(up, camera.roll);
|
||||
up = SHVec3::Normalise(up);
|
||||
|
||||
|
||||
|
|
|
@ -724,6 +724,14 @@ namespace SHADE
|
|||
|
||||
worldCamera->SetPerspective(90.0f, static_cast<float>(resizeWidth), static_cast<float>(resizeHeight), 0.0f, 100.0f);
|
||||
|
||||
auto cameraSystem = SHSystemManager::GetSystem<SHCameraSystem>();
|
||||
#ifdef SHEDITOR
|
||||
cameraSystem->GetEditorCamera()->SetWidth(resizeWidth);
|
||||
cameraSystem->GetEditorCamera()->SetHeight(resizeHeight);
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
for (auto& semaHandle : graphSemaphores)
|
||||
semaHandle = device->CreateSemaphore();
|
||||
|
||||
|
|
Loading…
Reference in New Issue