Main Menu

Mouse issues

Started by andrei, February 06, 2016, 09:41:57

Previous topic - Next topic

andrei

I've started creating my own 3D game and bumped on a error that I can't find a solution for.
You can see the error in the following video: https://www.youtube.com/watch?v=MUOrpwus7T8
I just click in that video, no dragging, and the camera moves. I want the camera to stay in place if I click and only move if I click and drag ( the click and drag works already ).

I am using a class that extends GLFWCursorPosCallback and calculate deltas and get them to rotate the camera.
mouseDX += (int) xpos - mouseX;
mouseDY += (int) ypos - mouseY;

mouseX = (int) xpos;
mouseY = (int) ypos;


Any hints ?

Kai

I am sure Thinmatrix explains this in his tutorial series as well.
So instead of copying his code and his 3D models, without knowing what it does, you might want to actually watch this or read other tutorials.
And it looks like you have been having this very simple issue, which was already answered, for half a year now: http://forum.lwjgl.org/index.php?topic=5835.0

andrei

Its true that I am learning by watching ThinMatrix tutorials.
I took a break from this as I had other projects.

Also now I added a fix that works perfectly.