min_x, min_y, min_z
max_x, max_y, max_z
The bounding box corners of the entity, relative to the entities'
origin, used for collision detection against other sprite or model
entities (for collision detection against the level or map entities not
the bounds, but
the hull is used). The bounds are initially set to default values
optimized for actors. If this is not desired, they can be changed by
a script. Take care that
when they are increased, and another entity is nearby, the latter
might get stuck.
Range:
Should not exceed the entity size.Type:
varRemarks:
- The default bounding box of an entity is derived from, but not identical
to the real size. It is calculated with an actor's collision behavior
in mind. An axis aligned bounding box does not rotate, so it is made
symmetrical in X and Y. min_z
and
max_z are taken from the real vertical
size of the first frame, while the horizontal diameter is "shrunk" by
50% for letting actors come closer to the player, or fit through
doors.
- The bounding box is automatically calculated at the begin of
the entity action, or - if one of the FAT and NARROW flag
is not set - every time when the entity scale or model is changed.
If you want to set a certain bounding box, wait one frame (wait(1)) after
creating the entitiy or after changing the scale or model, then set
the bounding box to its desired values.
- If the FAT and NARROW flags are both set, the bounding
box is not recalculated automatically, but can be set to the real
entity dimensions by c_setminmax or c_updatehull.
Example:
wait(1); // wait 1 frame after creation
vec_set(my.min_x,vector(-50,-50,-50));
vec_set(my.max_x,vector(50,50,50));
See also:
NARROW, FAT, c_setminmax, c_updatehull