myModel.boxMax in Anark Studio 2.5
Maximum bounding-box point.
This property is read-only.
- Property Type
- Vector
Returns a vector representing the maximum vertex of the bounding box for the model. The bounding box for a model is an imaginary cube drawn around it, and each corner of the cube is a vertex. The X, Y and Z values of each vertex are added together and the one with the highest value is determined to be the boxMin. The boxMin and boxMax properties are typically used in collision detection.
Note that this Vector is read-only; to obtain a modifiable copy of it for calculations, use the copy()
method on it.
This property is unaffected by the position/rotation/scale of the model. To find the world-space location, transform a copy()
of this value by the lastGlobalTransform
matrix:
var max = myObj.boxMax.copy();
max.transform(myObj.lastGlobalTransform);
//max is now in global space