selected camera..

Blitz3D Forums/Blitz3D Programming/selected camera..

Spy(Posted 2004) [#1]
hi ...

i have 4 cams in a project.. is there a way to see on which cam the mouse has clicked on ? like when i click it returns what cam it is..

or do i need to check the coordinates to see in what cam i am "in"?


Jeppe Nielsen(Posted 2004) [#2]
You will need to check if the mouse is within the camera´s vieport coordinates:
something like:
x=MouseX()
y=MouseY()
If x>=camerax
 If y>=cameray
  If x<=camerax+camerawidth
   If y<=cameray+cameraheight
    ;Do stuff...
   Endif
  Endif
 Endif
Endif