SetSpriteShapePolygon - AGK Help

SetSpriteShapePolygon

Description

Overrides the current auto generated shape for use in collision detection, hit testing, and physics. A shape can be set without turning physics on, and by default all sprites are set to use the box shape, which is the fastest to setup. The polygon is defined by a set of points (between 2 and 12) relative to the current sprite's offset. For example, a point of 0,0 would be centered on the sprite's offset point, any other value will be offset from this point.

Setting a shape removes all other shapes assigned to the sprite and replaces it with this one.

Definition

SetSpriteShapePolygon( iSpriteIndex, numPoints, index, x, y )

Parameters