POLYGON
If this flag is set, a model entities' real shape,
taken from its first animation frame,
is used for collision detection. Otherwise, an oriented bounding
box or ellipsoid is used.
Type:
Flag
(flags)
Remarks:
- Though it is not enforced,
this flag should be seen as mutually exclusive to calling phent_settype with
PH_POLY.
- Only one of the objects involved
in a collision should have a polygonal hull. Do not set this flag for
moving objects or for animated models. By default, this flag is set for terrains and map entities, and not
set for models and sprites.
-
Set this flag either in WED or at the start of the entity action. Setting it later will require additionally calling c_updatehull.
-
For making sure that all polygons of an object are taken into account, you might need to call c_setminmax for setting the object's bounding box to its real size.
-
For using a different animation frame than the first, use c_updatehull.
Example:
action boulder()
{
my.POLYGON = ON; // now using the polygonal shape of the model
set(my,POLYGON);
...
See also:
physics, collision, c_move,
c_setminmax,
c_updatehull, FAT / NARROW
► latest
version online