TerrainPhysicsPropertiesDialog

Package: Libraries.Interface.Controls.Scenes.Dialogs · Inherits from: Libraries.Interface.Events.TextChangeListener, Libraries.Interface.Controls.Control, Libraries.Interface.Forms.FormPrimitiveContainer, Libraries.Interface.Item, Libraries.Interface.Controls.Scenes.Dialogs.PropertiesDialog, Libraries.Interface.Item2D, Libraries.Language.Object, Libraries.Interface.Events.SelectionListener, Libraries.Interface.Controls.Dialog

The TerrainPhysicsPropertiesDialog sets how a selected terrain behaves in a game: how things collide with it (every region, only near moving bodies, or not at all), its friction, and whether it streams its regions around the camera, with a draw radius. They are saved in the scene. The scene editor itself never collides with a terrain, and always loads every region. It shows in the scene editor's Properties panel, after the terrain's name and facts (TerrainPropertiesDialog).

Actions

FocusField()

Moves the focus to the collision choices.

SelectionChanged(Libraries.Interface.Events.SelectionEvent event)

This action shows the dialog when a terrain is selected, and hides it otherwise.

Parameters

SetCollision(boolean enabled)

This action sets whether the terrain collides in games: every region, or not at all. The collision choices replaced the checkbox that used it; TerrainCollisionBehavior still calls it.

Parameters

  • enabled boolean: True for collision

SetFields(Libraries.Interface.Controls.Scenes.Items.EditorItem item)

This action sets the fields from a selected terrain's highlight.

Parameters

SetStreaming(boolean stream)

This action sets whether the terrain streams in games. The streaming checkbox calls it.

Parameters

  • stream boolean: True to stream

SetTerrain(Libraries.Interface.Controls.Scenes.Items.EditorTerrain terrain)

This action shows a terrain's physics settings.

Parameters

TextChanged(Libraries.Interface.Events.TextChangeEvent event)

This action sets the terrain's friction as it is typed. Text that isn't a number, or is below 0, is ignored.

Parameters

Inherited Actions

263 actions from Libraries.Interface.Controls.Control
20 actions from Libraries.Interface.Controls.Dialog
35 actions from Libraries.Interface.Controls.Scenes.Dialogs.PropertiesDialog
8 actions from Libraries.Interface.Forms.FormPrimitiveContainer
57 actions from Libraries.Interface.Item
200 actions from Libraries.Interface.Item2D
3 actions from Libraries.Language.Object