# GetSpriteHitTest

## Description

Returns 1 if the point x,y in world coordinates lies within the sprite, 0 if not. Takes into account the rotation and scale values of the sprite.
Uses the shape assigned to it from SetSpriteShape, if no shape is set it uses the sprite width and height as a box shape.
If you are testing a mouse or touch coordinate, remember to convert it to world coordinates using ScreenToWorldX and ScreenToWorldY.

## Definition

integer GetSpriteHitTest ( iSpriteIndex, x, y )

int agk::GetSpriteHitTest ( UINT iSpriteIndex, float x, float y )

## Parameters

- iSpriteIndex - The sprite to test.
- x - The x position in world coordinates to check.
- y - The y position in world coordinates to check.