vec_for_min (VECTOR*, ENTITY*)
vec_for_max(VECTOR*, ENTITY*)
Sets the vector to the minimum resp. maximum vertex coordinates of the current
model, terrain, or map entity, relative to the entities' origin. For
a model the coordinates of its current vertex frame is used. This instruction
can set an entities' bounding box to it's real size instead of
using the default
min_x..max_x
parameters.
Parameters:
VECTOR* |
vector to be set to the minimum or maximum coordinates |
ENTITY* |
pointer to the entity |
Speed:
MediumExample:
// set the bounding box to the real size of its first frame
my.frame = 1;
vec_for_min(my.min_x, my);
vec_for_max(my.max_x, my);
See also:
ent_vertices, vec_for_vertex,
vec_for_normal, vec_for_mesh, entity.min_x
► latest
version online