Graphics3D 640,480
SetBuffer BackBuffer()
Const width=640,height=480,depth=16
pl=CreatePivot()
camera=CreateCamera(pl)
PositionEntity camera,0,2,0
light=CreateLight()
RotateEntity light,90,0,0
plane=CreatePlane()
EntityColor plane,220,0,220
bot=CreateSphere()
ScaleEntity bot,.3,.3,.3
For x=1 To 8
t=CopyEntity(bot)
PositionEntity t, Rnd(-12,12), 1, Rnd(4,24)
EntityColor t,2,2,256
EntityPickMode t,2
Next
While Not KeyDown( 1 )
If MouseDown(1)=True
picked=CameraPick(camera,width/2,height/2)
EndIf
If picked=t
EntityColor t,0,799,200
picked=0
End If
TurnEntity camera,MouseYSpeed(),0,0
TurnEntity pl,0,-MouseXSpeed(),0
MoveMouse GraphicsWidth()*0.5,GraphicsHeight()*0.5
h#=70
If Abs(EntityPitch#(camera))>h# RotateEntity camera,h#*Sgn(EntityPitch#(camera)),0,0
If KeyDown( 205 )=True Then TurnEntity pl,0,-1,0
If KeyDown( 203 )=True Then TurnEntity pl,0,1,0
If KeyDown( 208 )=True Then MoveEntity pl,0,0,-0.05
If KeyDown( 200 )=True Then MoveEntity pl,0,0,0.05
RenderWorld
Text 0,40,"PickedX: "+PickedX#()
Text 0,60,"PickedY: "+PickedY#()
Text 0,80,"PickedZ: "+PickedZ#()
Flip
Wend
End
Почему не пикаются все,а только оди бот(пикаются но не изменяют цвет) Или предложите другой метод загрузки и расстановки ботов.