A color array sounds like the way to go! The only problem is that I have an array of planes,
imgArray as integer[15,10], and I need some way for
GetObjectRayCastHitID( 0 ) to detect that it has hit, say,
imgArray[2,8]
imgStuff = LoadImage("pic.png")
imageMemory = CreateMemblockFromImage(imgStuff)
imageWidth = GetMemblockInt(imageMemory,0)
imageHeight = GetMemblockInt(imageMemory,4)
/***************************************
Build pixel planes
***************************************/
imgArray as integer[15,10]
for Xfun = 0 to imageWidth-1
for Yfun = 0 to imageHeight-1
imgArray[Xfun,Yfun] = CreateObjectPlane(0.2,0.2)
SetObjectCullMode( imgArray[Xfun,Yfun], 0 )
SetObjectLightMode( imgArray[Xfun,Yfun], 0 )
setobjectColor(imgArray[Xfun,Yfun], GetMemblockbyte(imageMemory,(Yfun*15*4) + 12 + (Xfun*4)), GetMemblockbyte(imageMemory,(Yfun*15*4) + 12 + (Xfun*4)+1), GetMemblockbyte(imageMemory,(Yfun*15*4) + 12 + (Xfun*4)+2), 255)
SetObjectPosition( imgArray[Xfun,Yfun], xfun*0.2, -yfun*0.2, 5.0 )
SetObjectRotation( imgArray[Xfun,Yfun], 0.0, 0.0, 0.0)
next Yfun
next Xfun