Adjust AR for game camera. Expose FOV to inspector #353

Merged
maverickdgg merged 3 commits from SP3-141-Camera-System into main 2023-02-20 14:54:04 +08:00
2 changed files with 15 additions and 1 deletions
Showing only changes of commit c9e9a30c3f - Show all commits

View File

@ -254,7 +254,8 @@ RTTR_REGISTRATION
.property("Height", &SHCameraComponent::GetHeight, &SHCameraComponent::SetHeight)
.property("Near", &SHCameraComponent::GetNear, &SHCameraComponent::SetNear)
.property("Far", &SHCameraComponent::GetFar, &SHCameraComponent::SetFar)
.property("Perspective", &SHCameraComponent::GetIsPerspective, &SHCameraComponent::SetIsPerspective);
.property("Perspective", &SHCameraComponent::GetIsPerspective, &SHCameraComponent::SetIsPerspective)
.property("FOV",&SHCameraComponent::GetFOV, &SHCameraComponent::SetFOV);
}

View File

@ -145,6 +145,19 @@ namespace SHADE
//std::cout << EVENT_DATA->resizeWidth << std::endl;
//std::cout << EVENT_DATA->resizeHeight << std::endl;
for (auto director : directorHandleList)
{
auto camera = SHComponentManager::GetComponent_s<SHCameraComponent>(director->mainCameraEID);
if (camera)
{
camera->SetWidth(EVENT_DATA->resizeWidth);
camera->SetHeight(EVENT_DATA->resizeHeight);
}
}
return eventPtr->handle;
}