entity pick

Blitz3D Forums/Blitz3D Beginners Area/entity pick

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

The variable e\shape is assigned to a sphere (eventually to be replaced with a model) in a separate function. I tried setting its pickmode to -2 and the environments pickmode to 2 like this:

Function
e\shape=createsphere()
EntityPickMode e\shape,-2
EntityPickMode city1,2
blah blah blah
End Function

Function
If weaponout=1
picked=CameraPick(camera,378,278)
If picked>0 Then
makehole(hole,holes)
makespark(spark,sparks)
EndIf

If picked<0
ShowEntity ball
EntityShininess ball,1
EntityColor ball,200,0,0
ScaleEntity ball,1,1,1
PositionEntity ball,PickedX(),PickedY(),PickedZ(),True
EntityType ball,1
Animate ball,3,.2
EndIf
EndIf
End Function

I still get no response when I shoot the sphere.