All info in the code

...
`----------------------------------
`Pick Object Demonstration
`By Joseph Thomson
`18/03/04
`----------------------------------
`Setup
SYNC ON
SYNC RATE 60
`Make spheres and arrange in a circle
for x = 1 TO 10
MAKE OBJECT SPHERE x,30
POSITION OBJECT x,SIN(x*36)*100,0,COS(x*36)*100
next x
do
`Get the nearest hovered object at the mouse coordinates, check from object 1 to 10
pickedObject = PICK OBJECT(MOUSEX(),MOUSEY(),1,10)
`Loop through objects
for x = 1 TO 10
`If it is picked colour it red and print the 3D intersection info
if pickedObject = x
COLOR OBJECT x,RGB(255,0,0)
TEXT 0,0,"Intersect X: "+STR$(GET PICK VECTOR X())
TEXT 0,20,"Intersect Y: "+STR$(GET PICK VECTOR Y())
TEXT 0,40,"Intersect Z: "+STR$(GET PICK VECTOR Z())
TEXT 0,60,"Intersect Distance (From camera): "+STR$(GET PICK DISTANCE())
`If it is not picked colour it white
ELSE
COLOR OBJECT x,RGB(255,255,255)
endif
next x
`Rotate the camera is some sort of fashion
camA# = WRAPVALUE(camA# + 0.5)
POSITION CAMERA SIN(camA#)*150,50,COS(camA#)*150
POINT CAMERA 0,0,0
SYNC
loop
Trying is the first step towards faliure.
Athelon XP 1600+/Radeon 9600 Pro/256 RAM
