Skip to reading
PCA Script Programming

center_gui_model()

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 PDF page

Center GUI Model | Action ID: CenterGUIModel

Fit and center the model displayed inside a GUI 3D model viewer.

Source table from center_gui_model(), page 182
Option key / fieldMeaning and accepted inputDefault
GUI guiIdChoose an authored GUI ID.Blank
3D Model elementIdChoose an element inside the selected GUI.Blank

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
center_gui_model({"guiId": "hud", "elementId": "topline"})

In use. Offer a Reset View button after the player rotates a model. It targets the GUI viewer, not the scene's active gameplay camera or the model's source file.

Page 182 of 357Permalink
Go to page