# GetSpriteYFromWorld

## Description

Converts a point in world coordinates to a point on the sprite. This is the opposite of GetWorldYFromSprite and will return values relative to the sprite's center point defined with SetSpriteOffset. By default this is the center of the sprite. The command is not limited by the size of the sprite, it may return values larger than the sprite bounds.

## Definition

float GetSpriteYFromWorld( iSpriteIndex, x, y )

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

## Parameters

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