Hook up the "Use Ground Plane" toggle.
The "Use Ground Plane" toggle is now functional. When disabled, the terrain layer spawner will say "terrain exists = false" for any point in its bounds unless there's also a Terrain Height Gradient List component with a valid entry. When enabled, it will always say "terrain exists = true", and it will return the min height of the spawner box as the ground plane if there's no valid Terrain Height Gradient List height provider. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
@@ -168,7 +168,14 @@ namespace Terrain
|
||||
bool m_terrainSurfacesDirty = false;
|
||||
AZ::Aabb m_dirtyRegion;
|
||||
|
||||
// Cached data for each terrain area to use when looking up terrain data.
|
||||
struct TerrainAreaData
|
||||
{
|
||||
AZ::Aabb m_areaBounds{ AZ::Aabb::CreateNull() };
|
||||
bool m_useGroundPlane{ false };
|
||||
};
|
||||
|
||||
mutable AZStd::shared_mutex m_areaMutex;
|
||||
AZStd::map<AZ::EntityId, AZ::Aabb, TerrainLayerPriorityComparator> m_registeredAreas;
|
||||
AZStd::map<AZ::EntityId, TerrainAreaData, TerrainLayerPriorityComparator> m_registeredAreas;
|
||||
};
|
||||
} // namespace Terrain
|
||||
|
||||
Reference in New Issue
Block a user