physics_get_friction

This function gets the friction value for a bound fixture.

Syntax:

GML Code Example

physics_get_friction(fixture)


Argument Description
fixture the id of the bound fixture


Returns: Real


Description

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 get the friction value of the bound fixture (not the "base" fixture) at any time using this function.


Example:

GML Code Example

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.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here