Skip to reading
3D Models & Video in GUIs

11. Use model actions in a GUI event

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

1. Add a Button beside object_viewer and give it the caption Center model.

2. Open Events and set Click to Center GUI Model.

3. Choose GUI model_lab and 3D Model object_viewer.

4. Run the game, move the view and press the Button.

Figure 13. Center GUI Model targets the owning GUI and the 3D Model element.

Source table from 11. Use model actions in a GUI event, page 18
Shared actionFields
Center GUI ModelGUI and 3D Model.
Play GUI Model AnimationGUI, 3D Model, Animation, Loop and Speed.
Change GUI Element PropertyFor authored viewer fields such as assetId, modelInitialView or modelAnimated.

These actions are also available in action lists and visual scripting. Use a separate Button for a story action when dragging should remain a harmless inspection gesture. A model’s generic mouse Click event can otherwise fire at the start of an orbit drag.

Page 18 of 45Permalink
Go to page