entity, var width)
Sets the skin penetration width for an individual physics entity
(actor) or for all all subsequently created character controllers. It is like decreasing the collision volume. The
simulation deals with inaccuracy when stacking objects by letting
them slightly inter penetrate each other. The amount of permitted
penetration can be regulated with this function.
Registered entity pointer (Actor),
or NULL for setting the skin width only for character controllers (see below).
Penetration width (default: 0.1)
Nonzero if successful, 0
width specifies how much objects can inter penetrate, as opposed to
how much they are separated.
- The amount of inter
penetration that is best permitted depends on many things such as
the size of the objects involved but also on the stability of the
simulation, which is usually governed by the gravity setting as well
as the time step size. Lower gravity and smaller time steps
typically result in more stable simulations.
A8.41 For character controllers (PH_CHAR) the penetration also determines the maximum step height the character can climb. It must be set before creating the actor; it can not be set afterwards. Call pXent_setskinwidth(NULL,...) for setting the skin width for all subsequently created character controllers.
// on startup
myCrate = ent_create( "crate.mdl", nullvector, any_function );
pXent_settype( myCrate, PH_RIGID, PH_BOX );