# SpriteRayCastSingle

## Description

Casts a ray through a particular sprite (can be physics or non physics) and stores the result of any intersection. Results of a ray cast can be retrieved using the other ray cast functions such as GetRayCastNormalX. If the ray starts inside a shape that shape will not be counted in the results. This function is sepcial in that it also works on all sprites even those that do not have physics turned on, but the sprite must have been assigned a shape using one of the sprite shape commands.
Returns 1 if there was a collision, 0 if not.

## Definition

integer SpriteRayCastSingle( sprite, x, y, x2, y2 )

int agk::SpriteRayCastSingle( UINT sprite, float x, float y, float x2, float y2 )

## Parameters

- sprite - The sprite ID to check for intersection with the ray.
- x - The X coordinate of the start point in world coordinates.
- y - The Y coordinate of the start point in world coordinates.
- x2 - The X coordinate of the end point in world coordinates.
- y2 - The Y coordinate of the end point in world coordinates.