← Documentation Home

SetBodyFriction

Category: 2D Game Physics (Pro)

Back to System Functions


Signature

SetBodyFriction(body As Integer, friction As Double)

Returns

Void

Description

Sets surface friction from 0 through 1.

Performance and behavior

The contact solver combines the friction values of both touching bodies. Values are clamped to the valid range.

Pro feature: compiling code that uses this function requires a license with the GamePhysics feature enabled.

Example

SetBodyFriction ground, 0.9