To make the box walk ontop of the matrix, add this line of code near the end of your main loop...
Position Object 1,Object Position X(1),Get Ground Height(1, Object Position X(1),Object Position Z(1))+5,Object Position Z(1)
...To make the box not able to leave the matrix, use...
If Object Position X(1)<0 then Position Object 1,0,Get Ground Height(1,0,Object Position Z(1))+5,Object Position Z(1)
If Object Position X(1)>50 then Position Object 1,50,Get Ground Height(1,50,Object Position Z(1))+5,Object Position Z(1)
If Object Position Z(1)<0 then Position Object 1,Object Position X(1),Get Ground Height(1,Object Position X(1),0)+5,0
If Object Position Z(1)>50 then Position Object 1,Object Position X(1),Get Ground Height(1,Object Position X(1),50)+5,50
...Also add this line of code underneath your "Prepare Matrix Texture" code...
Randomize Matrix 1,10
...Well... I hope I helped...
Programming isn’t an addiction, its more of a mental and social dependancy.