What I am trying to accomplish is that if I press mouse button, player shoot ray wich when colliding to other object recognizes it. Theres nothing really going wrong because I dont even know where to start. I know that I have somehow change my screen coordinates to world coordinates, am I right? This just involves matrixes and I cant do the math, not yet atleast. Theres no flaw in that section of the code, because there isnt that section
Edit. More accurately, I have aiming cross at center of the screen and I want to shoot ray to there and if it collides with something it could at this point just print something. All I think I need is to know how to do the conversion from x = WIDTH/2 y = HEIGHT/2 to my world coordinates. Atleast this is what I think I need for now.