GetObjectBoundingBox: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetObjectBoundingBox(object)}} {{FuncParameters}} {{FuncParam|object|__EDIT_ME__}} {{FuncReturnVa..." |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Client|1.0}} | {{Info|Function|Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Gets the local bounds of the object.}} | ||
{{FuncSyntax|GetObjectBoundingBox(object)}} | {{FuncSyntax|GetObjectBoundingBox(object)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|object| | {{FuncParam|object|The object identifier.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns 6 floats: MinX, MinY, MinZ, MaxX, MaxY, MaxZ | ||
Min is the origin (pivot) minus the extent of the object. | |||
Max is the origin (pivot) plus the extent of the object.}} | |||
== Example == | == Example == | ||
[https://github.com/BlueMountainsIO/OnsetLuaScripts/blob/6f45ad9607e30c97f4f1d58443d808da632d4d91/mapeditor/client/editor.lua#L180 See example from the map editor on GitHub.] | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[GetObjectCount]] | |||
* [[GetObjectModelCount]] | |||
* [[GetObjectModelGroup]] | |||
* [[GetObjectModelName]] | |||
* [[GetStreamedObjects]] | |||
* [[GetObjectModel]] | |||
* [[GetObjectLocation]] | |||
* [[GetObjectRotation]] | |||
* [[GetObjectScale]] | |||
* [[GetObjectSize]] | |||
* [[EnableObjectHitEvents]] | |||
* [[GetObjectMass]] | |||
* [[SetObjectEditorSpeed]] | |||
* [[SetObjectEditable]] | |||
* [[SetObjectOutline]] | |||
* [[SetObjectCastShadow]] | |||
* [[SetObjectColor]] | |||
* [[SetObjectEmissiveColor]] | |||
* [[SetObjectTexture]] | |||
* [[SetObjectAnimatedTexture]] |
Latest revision as of 11:27, 2 November 2020
Description
Gets the local bounds of the object.
Syntax
GetObjectBoundingBox(object)
Parameters
- object
The object identifier.
Return Value
- Returns 6 floats: MinX, MinY, MinZ, MaxX, MaxY, MaxZ
Min is the origin (pivot) minus the extent of the object. Max is the origin (pivot) plus the extent of the object.
Example
See example from the map editor on GitHub.
See also
- GetObjectCount
- GetObjectModelCount
- GetObjectModelGroup
- GetObjectModelName
- GetStreamedObjects
- GetObjectModel
- GetObjectLocation
- GetObjectRotation
- GetObjectScale
- GetObjectSize
- EnableObjectHitEvents
- GetObjectMass
- SetObjectEditorSpeed
- SetObjectEditable
- SetObjectOutline
- SetObjectCastShadow
- SetObjectColor
- SetObjectEmissiveColor
- SetObjectTexture
- SetObjectAnimatedTexture