Andy Gilbert Posted August 17, 2011 Share Posted August 17, 2011 Hi, im trying to get the mouse 3d position? Like the Z (but not the mosue wheel!) when i once programmed in openGL i used this feature for a level editor for example. how can i get the mouse position in 3D coords? Thanks Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Paul Thomas Posted August 17, 2011 Share Posted August 17, 2011 CameraProject Quote Link to comment Share on other sites More sharing options...
Andy Gilbert Posted August 17, 2011 Author Share Posted August 17, 2011 Thanks paul. Looking at that though i feel i might run into trouble, there looks to be some direct opengl commands in there? can that be called from lua? glReadPixels(MouseX(), GraphicsHeight() - MouseY(), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, Varptr(depth)) thanks Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Paul Thomas Posted August 17, 2011 Share Posted August 17, 2011 Hmm, I actually have no idea, I don't use Lua often. Should ask Mack. I'll point him here. Quote Link to comment Share on other sites More sharing options...
Andy Gilbert Posted August 17, 2011 Author Share Posted August 17, 2011 Ok thanks paul. Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Andy Gilbert Posted August 18, 2011 Author Share Posted August 18, 2011 Anyone know this? Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.