Mouse Pick
Blitz3D Forums/Blitz3D Beginners Area/Mouse Pick
| ||
Been a while since I worked with my Blitz3D so I'm a little rusty. This question is probably already answered somewhere here but. How do I pick an object on the screen with my mouse. What I want to do is write my own Keno game. I must be able to select the numbers I want from the screen. I plan on using an object for each of the 80 numbers. Then I can animate each object as it is selected. Thanks! |
| ||
Easiest way is probably a CameraPick based on the position of the mouse - CameraPick(camera,MouseX(),MouseY()). EDIT: Baring in mind you have to set EntityPickMode on the things you are picking. |
| ||
The example of CameraPick uses a 3D world and a cube. And placing the cube in different locations causes perspective, so the cube is distorted as it gets farther from the center of the screen. I need it to be on a 2D screen, so each cube stays perfectly square. |
| ||
You can probably get around that with the CameraProjMode. |
| ||
Thanks that worked. Needs the CameraZoom function as well. I wish Blitz3D had simple gadget button commands. |
| ||
I wish Blitz3D had simple gadget button commands. It doesnt because you can easily make your own. :) or download a dll |