# GetWorldXFromSprite

## Description

Converts a point on the sprite to world coordinates. For example if a 10x10 sprite was rotated by 45 degrees around its center point (at 5x5) then to find the position in the world of the sprite's top left corner you would call this command with the values -5,-5, since the values are relative to the sprite's center point (defined by SetSpriteOffset). The command is not limited by the size of the sprite, so in the above example values of 20 or -15 would both be valid.

## Definition

float GetWorldXFromSprite( iSpriteIndex, x, y )

float agk::GetWorldXFromSprite( UINT iSpriteIndex, float x, float y )

## Parameters

- iSpriteIndex - The ID of the sprite to check.
- x - The X component of the point on the sprite.
- y - The Y component of the point on the sprite.