Terrain Destruction

Overview

Apply explosive ordnance of user-set intensity and size at any location on a terrain map. Deformation of the surface geometry may change depending on the material/structure classification at that point.

Page Contents

Purpose

Apply explosive ordnance of user-set intensity and size at any location on a terrain map. Deformation of the surface geometry may change depending on the material/structure classification at that point.

How to Use

Select your desired terrain map and choose Load Terrain. Once the terrain completes streaming into the scene, use the Destructibility Settings pop-up sliders to adjust the Power and Range values for the explosive ordnance.

Settings

  • Power, set from 0 to 2000; default 300
  • Range, set from 0 to 5; default 1  
  • Middle-click a point on the map to trigger the explosive ordnance

Camera

  • Hold right-click and move cursor to rotate camera
  • Press WASD keys to move camera
  • Press QE keys to rotate camera
  • Hold Space bar to raise camera
  • Hold Ctrl to lower camera

Note, terrain menu cannot be toggled off currently. Use the top arrows to switch to the smaller system menu.

Tip

If steaming terrain on a mobile device (Android/iOS) strongly recommend setting the Radius to a value of < 800 to avoid running out of device memory.

Scene Location & Name

Assets/Ride/Examples/TerrainDestruction/ExampleTerrainDestruction.unity

Setup Requirements 

Utilize the destructibility commands API for your scene by adding the Destructor prefab, which includes the necessary Fine Breaker, Chip Mesh At Point, Voronoi Cache and Cached Split Trees script components, as well as the Destructibility Settings panel Canvas object. 

Destructor Prefab

First, instance the Destructor Prefab in your scene, which contains the Fine Breaker script that defines the values for user-set destructibility.

Example Load Terrain Script, Terrain Camera and Event System Objects

In order to load terrain maps, add the ExampleLoadTerrain script to an empty game object in your scene.

Enable the triggering of explosive ordnance command with the EventSystem object.

If you wish to manipulate the camera, replace Main Camera with the TerrainCamera prefab, or add SimpleTerrainCamera script component to Main Camera.

Related Information

Deformation of geometry calculations based upon Voronoi partition with Delaunay triangulation