Colliding camera with mesh

Blitz3D Forums/Blitz3D Beginners Area/Colliding camera with mesh

Hi There,

Once 2 objects have collided i.e in my case the Camera being the player and the mesh being a gun, I would like to display on the screen that the player can use the gun by pressing a key.

However the collision will only hold true for as long as I hold the move up key down.

Is there a way of coliding with an object and holding the condition true untill the camera(player) moves away from it...i.e keep the option to choose a gun while standing near it.

I use the code below to detect the collision. The guns are types as there is more than 1 gun dotted around the map.

For g.gun = Each gun

If EntityCollided ( camera,col_gun )
Text 0,0, "Press 'Enter' key to use gun"
End If

Next