# CalculateSpritePhysicsCOM

## Description

Recalculates the COM based on the shapes attached to the sprite, if you have overriden the COM this will set it back to a location decided by the AGK. If the COM is very different from the offset point the sprite may seem unstable as it will behave like an unbalanced spinning top.

## Definition

CalculateSpritePhysicsCOM( iSpriteIndex )

void agk::CalculateSpritePhysicsCOM( UINT iSpriteIndex )

## Parameters

- iSpriteIndex - The ID of the sprite to modify.