diff --git a/Source/Engine/Graphics/RenderTask.cpp b/Source/Engine/Graphics/RenderTask.cpp index d30e8e37c..405e0fe45 100644 --- a/Source/Engine/Graphics/RenderTask.cpp +++ b/Source/Engine/Graphics/RenderTask.cpp @@ -283,11 +283,10 @@ Viewport SceneRenderTask::GetViewport() const GPUTextureView* SceneRenderTask::GetOutputView() const { - if (Output) + if (Output && Output->IsAllocated()) return Output->View(); if (SwapChain) return SwapChain->GetBackBufferView(); - CRASH; return nullptr; } diff --git a/Source/Engine/Physics/Colliders/CharacterController.cpp b/Source/Engine/Physics/Colliders/CharacterController.cpp index e0630573e..79410bdf4 100644 --- a/Source/Engine/Physics/Colliders/CharacterController.cpp +++ b/Source/Engine/Physics/Colliders/CharacterController.cpp @@ -361,6 +361,11 @@ void CharacterController::OnTransformChanged() UpdateScale(); UpdateBounds(); } + else if (!_controller) + { + _box = BoundingBox(_transform.Translation, _transform.Translation); + BoundingSphere::FromBox(_box, _sphere); + } } void CharacterController::Serialize(SerializeStream& stream, const void* otherObj)