This function sets the friction value for a bound fixture.


physics_set_friction(fixture, friction)

Argument Description
fixture the id of the bound fixture
friction the new friction value to apply

Returns: N/A


When you bind a fixture to an instance using physics_fixture_bind this returns an "id" for the bound fixture. You can use this id to set the friction value of the bound fixture, not the "base" fixture, at any time using this function.


var fric = physics_get_friction(fix_id);
physics_set_friction(fix_id, fric + 0.1);

The code above gets the current friction value for the bound physics properties of the instance and then sets them to a different value.

Back: Fixtures
Next: physics_set_density
© Copyright YoYo Games Ltd. 2015 All Rights Reserved