they're so small in comparison to the huge wagon.
img=LoadImage("./12cowleft1.png")LockBuffer ImageBuffer(img)pixel=CreateCube()ScaleMesh pixel,0.5,0.5,0.5; Spritesheet InfoSpriteWidth=12 ;my cactus is 32x32 pixelsSpriteHeight=12SpritesX=ImageWidth(img)/SpriteWidthSpritesY=ImageHeight(img)/SpriteHeightFor sy=0 To SpritesY-1 For sx=0 To SpritesX-1 ; For each sprite (8 x 8 spritesheet of 16x16 pixels ID=(sy*SpritesX)+sx ;retain the ID of EVERY bit of the wagon so it can be moved elsewhere P1_3IDs(sy)=ID ;save the Last WagonID number P1_3LastId=SpritesY-1 Player1Sprite[ID]=CreateMesh() For yL=0 To SpriteHeight For xL=0 To SpriteWidth cx#=Float(xL)-(Float(SpriteWidth)/2.0) cy#=Float(yL)-(Float(SpriteHeight)/2.0) cz=0 argb=ReadPixelFast((sx*SpriteWidth)+xL,(sy*SpriteHeight)+yL,ImageBuffer(img)) r=(argb And $00FF0000) Shr 16 g=(argb And $0000FF00) Shr 8 b=(argb And $000000FF) If r>4 Or g>4 Or b>4 ; Assuming 0,0,0 = transparent tbrush=CreateBrush(r,g,b) PaintMesh pixel,tbrush PositionMesh pixel,cx,cy,cz AddMesh pixel,Player1Sprite[ID] PositionMesh pixel,-cx,-cy,-cz FreeBrush tbrush EndIf Next Next RotateEntity Player1Sprite[ID],180,90,0 MoveEntity Player1Sprite[ID],3*27,9,0 MoveEntity Player1Sprite[ID],-160,-20,60 UpdateNormals Player1Sprite[ID] NextNextUnlockBuffer ImageBuffer(img)FreeEntity pixel
Cool! I remember a 10 liner on the Amstrad which had a shot out cowboy game where if you hit the cactus the bullet would change direction by 90 degrees! Real physics I tell 'ya!