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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user