Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualViped

Posted 03 November 2012 - 04:17 AM

Thanks for your comment. I know thats bad habit and I am trying to get rid of it.

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 Posted Image So the code is there just if someone needs to see how I have set up camera and so on to help me, or any other reason.

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.

#1Viped

Posted 03 November 2012 - 01:15 AM

Thanks for your comment. I know thats bad habit and I am trying to get rid of it.

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 :) So the code is there just if someone needs to see how I have set up camera and so on to help me, or any other reason.

PARTNERS