Skip to content

MeshRotationField ​

Inherits: VBoxContainer

A field for a mesh and the way it is turned: a title, a button with the name of the mesh (it opens the mesh catalog), a button that empties it, and three numbers (the turn in degrees on x, y and z). Used by the item editor (the projectile model of an item) and the weapon editor (the ammo model of a ranged weapon): a model that does not have its tip along +Y is turned by the rotation so that it does. Set it up with configure, show a resource's values with set_values (it does not send changed), and read mesh and rotation_degrees_value.

Variables ​

Meshmeshnull
Vector3rotation_degrees_valueVector3.ZERO

Methods ​

voidconfigure( title: String, tooltip: String, dialog_manager: DialogManager )
voidset_values( new_mesh: Mesh, new_rotation: Vector3 )

Signals ​

changed() ​

Sent when the mesh or the turn is changed by the user

Variable descriptions ​

Mesh mesh = null ​

The mesh in the field (null: none)

Vector3 rotation_degrees_value = Vector3.ZERO ​

The turn of the mesh, degrees on x, y and z

Method descriptions ​

void configure( title: String, tooltip: String, dialog_manager: DialogManager ) ​

Gives the field its title, a tooltip, and the dialog manager that opens the mesh catalog

void set_values( new_mesh: Mesh, new_rotation: Vector3 ) ​

Shows a mesh and a turn (without sending changed)