Render Colliders (#5434)

* Render Colliders

Signed-off-by: rhhong <rhhong@amazon.com>

* CR feedback

Signed-off-by: rhhong <rhhong@amazon.com>
This commit is contained in:
Roman
2021-11-09 13:42:56 -08:00
committed by GitHub
parent e6a1f8ed0a
commit aa229976f3
23 changed files with 655 additions and 72 deletions
@@ -137,6 +137,18 @@ namespace AtomToolsFramework
m_viewportContext->SetRenderScene(nullptr);
return;
}
// Check if the scene already has an atom scene attached. In this case we don't need to create a new atom scene.
if (auto existingScene = scene->FindSubsystem<AZ::RPI::ScenePtr>())
{
m_viewportContext->SetRenderScene(*existingScene);
if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor<AZ::RPI::AuxGeomFeatureProcessorInterface>())
{
m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get());
}
return;
}
AZ::RPI::ScenePtr atomScene;
auto initializeScene = [&](AZ::Render::Bootstrap::Request* bootstrapRequests)
{