# AddSpriteShapeBox

## Description

Adds a new shape to the sprite, in addition to any it already has. These additional shapes only apply to physics sprites and must be added after a sprite has been set to use physics.
The box is defined by specifying its top left and bottom right coordinates in sprite space, relative to its current offset. For example if the current sprite offset was 0,0 the top left box corner would be 0,0, but if the sprite offset was the middle of the sprite (default) the top left corner would be -width/2,-height/2. You may also specify an angle to offset the box relative to the current sprite rotation.
This will recalculate the sprite's mass and center of mass values.

## Definition

AddSpriteShapeBox( iSpriteIndex, x, y, x2, y2, angle )

void agk::AddSpriteShapeBox( UINT iSpriteIndex, float x, float y, float x2, float y2, float angle )

## Parameters

- iSpriteIndex - The ID of the sprite to modify.
- x - The x coordinate of the top left corner of the new box in sprite space.
- y - The y coordinate of the top left corner of the new box in sprite space.
- x2 - The x coordinate of the bottom right corner of the new box in sprite space.
- y2 - The x coordinate of the bottom right corner of the new box in sprite space.
- angle - The angle of the box in radians.