boundingBoxReal: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns a bounding box of given object in model coordinates space. |= Description
| Returns a bounding box of given object in model coordinates space. This command is similar to [[boundingBox]] but gives more precise measurements. [[File:Boundingbox.jpg|thumb|Bounding Box]] |= Description
 
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 14: Line 15:
|p1= obj: [[Object]]  |= PARAMETER1  
|p1= obj: [[Object]]  |= PARAMETER1  


| [[Array]] - An array with the extreme points of the model. Format <nowiki>[[</nowiki>minX, minZ, minY], [maxX, maxZ, maxY<nowiki>]]</nowiki>. |= RETURNVALUE  
| [[Array]] - An array with the extreme points of the model. Format <nowiki>[[</nowiki>x1,y1,z1],[x2,y2,z2<nowiki>]]</nowiki>. |= RETURNVALUE  




|x1= <code>
|x1= <code>_bbr = [[boundingBoxReal]] [[vehicle]] [[player]];
_p1 = _bbr [[select]] 0;
_p2 = _bbr [[select]] 1;
_maxWidth = [[abs]] ((_p2 [[select]] 0) - (_p1 [[select]] 0));
_maxLength = [[abs]] ((_p2 [[select]] 1) - (_p1 [[select]] 1));
_maxHeight = [[abs]] ((_p2 [[select]] 2) - (_p1 [[select]] 2));
</code>|= EXAMPLE1  
</code>|= EXAMPLE1  



Revision as of 21:54, 31 July 2013

Hover & click on the images for description

Description

Description:
Returns a bounding box of given object in model coordinates space. This command is similar to boundingBox but gives more precise measurements.
Bounding Box
Groups:
Uncategorised

Syntax

Syntax:
boundingBoxReal obj
Parameters:
obj: Object
Return Value:
Array - An array with the extreme points of the model. Format [[x1,y1,z1],[x2,y2,z2]].

Examples

Example 1:
_bbr = boundingBoxReal vehicle player; _p1 = _bbr select 0; _p2 = _bbr select 1; _maxWidth = abs ((_p2 select 0) - (_p1 select 0)); _maxLength = abs ((_p2 select 1) - (_p1 select 1)); _maxHeight = abs ((_p2 select 2) - (_p1 select 2));

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section