it's your code but I disable some parts:
// set window properties
SetWindowTitle( "CreateShape" )
// set display properties
SetVirtualResolution( GetDeviceWidth(), GetDeviceHeight() )
SetOrientationAllowed( 1, 1, 1, 1 )
spr2 = CreateSprite(LoadImage("spr.png"))
SetSpriteSize (spr2,512,-1)
SetSpritePhysicsOn(spr2,1)
w# = GetSpriteWidth(spr2)
h# = GetSpriteHeight(spr2)
// first box
SetSpriteShapeBox(spr2, -w#*0.5, h#*0.5, -w#*0.25, -h#*0.25, 0)
// middle polygon
points = 6
AddSpriteShapePolygon(spr2, points, 0, -w#/4, -h#/4)
AddSpriteShapePolygon(spr2, points, 1, -w#/8, -h#/2)
//AddSpriteShapePolygon(spr2, points, 2, w#/8, -h#/2)
//AddSpriteShapePolygon(spr2, points, 3, w#/4, -h#/4)
//AddSpriteShapePolygon(spr2, points, 4, w#/4, h#/2)
//AddSpriteShapePolygon(spr2, points, 5, -w#/4, h#/2)
/*
// last polygon
points = 4
AddSpriteShapePolygon(spr2, points, 0, w#/4, -h#/4)
AddSpriteShapePolygon(spr2, points, 1, w#/2, 0)
AddSpriteShapePolygon(spr2, points, 2, w#/2, h#/2)
AddSpriteShapePolygon(spr2, points, 3, w#/4, h#/2)
*/
SetSpritePositionByOffset(spr2,300,200)
SetPhysicsDebugOn()
do
Print( ScreenFPS() )
Sync()
loop
Quote: "Have you read the help file for this command? http://www.appgamekit.com/documentation/Reference/Sprite/AddSpriteShapePolygon.htm"
Yes I read it.
it's right that middle sprite have 6 points.
but why for every vertex used 6 point?
points = 6
AddSpriteShapePolygon(spr2, points, 0, -w#/4, -h#/4)
it's very Dumb for me and can't understand why use one or two AddSpriteShapePolygon() don't show anything.