pXent_setfriction ( entity, var friction );

Set the entity's friction for collisions. Friction is what makes objects stick to each other, when moved sideways. friction can be set to values between 0 and 100, with 0 effectively disabling friction (similar to what you experience when walking on ice) and 100 setting maximum friction (rubber on rubber). Whenever possible you should set friction to 0, as this speeds up the calcuations and prevents instability. Setting friction to a value larger than 100 percent is faster than setting friction to some arbitrary value between 0 and 100, but it can introduce some instability problems when objects move at high speeds (e.g. don't set car wheels to 110% friction).


entity registered Entity pointer (Actor)
friction coefficient of friction- between 0 for no friction (ice) and 100 for high friction (rubber) or >100 for infinite friction


1 if successful, 0 otherwise.





pXent_setfriction(my, 0);

See also: