GetSpriteInBox
Description
Returns 1 if the sprite's collision shape is touching the given box in world coordinates, 0 if not. If the sprite does not have a shape it is assigned a box shape of its own which will remain after this command. This command takes into account the rotation and scale of the sprite when checking intersection.
Definition
integer GetSpriteInBox( iSprite, x1, y1, x2, y2 )
int agk::GetSpriteInBox( UINT iSprite, float x1, float y1, float x2, float y2 )
Parameters
- iSprite - The ID of the sprite to check
- x1 - The X coordinate of the top left corner of the box in world coordinates.
- y1 - The Y coordinate of the top left corner of the box in world coordinates.
- x2 - The X coordinate of the bottom right corner of the box in world coordinates.
- y2 - The Y coordinate of the bottom right corner of the box in world coordinates.