# SetSpritePhysicsFriction

## Description

Sets the friction value to use for this sprite during physics calculations. Should be in the range 0 to 1. By default this sets all the shapes assigned to this sprite to the same value, you can instead set it on a per shape basis by specifying a shapeID greater than 0. Shape IDs start at 1 for the first shape, with 0 meaning apply it to all shapes.

## Definition

SetSpritePhysicsFriction( iSpriteIndex, friction )

void agk::SetSpritePhysicsFriction( UINT iSpriteIndex, float friction )

SetSpritePhysicsFriction( iSpriteIndex, friction, shapeID )

void agk::SetSpritePhysicsFriction( UINT iSpriteIndex, float friction, int shapeID )

## Parameters

- iSpriteIndex - The ID of the sprite to modify.
- friction - The new friction value.
- shapeID - The ID of the shape to change, 0 to apply the value to all shapes