# GetPhysicsCollision

## Description

Returns 1 if two physics sprites overlap, otherwise it returns 0. This function doesn't do any calculation, it simply looks up the results of the last physics step to determine if the sprites currently overlap. If this function returns true you can get the point of collision using GetPhysicsCollisionX and GetPhysicsCollisionY, if there is more than one point of collision it is not known which point will be returned. You can check the sprite's contact list to get the full list of contact points.
This function is affected by group and category settings.

## Definition

integer GetPhysicsCollision( iSprite1, iSprite2 )

int agk::GetPhysicsCollision( UINT iSprite1, UINT iSprite2 )

## Parameters

- iSprite1 - The ID of the first sprite to check
- iSprite2 - The ID of the second sprite to check