Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ofEasyCam: fixes floating point errors in rotation + events priority #3118

Merged
merged 1 commit into from
Jul 30, 2014

Conversation

arturoc
Copy link
Member

@arturoc arturoc commented Jul 30, 2014

Fixes this problem: http://forum.openframeworks.cc/t/ofeasycam-roll-when-dragging-problem/14424/6 which was caused from calculating the rotation from the difference with the last mouse position which introduced small floating point errors on every update. Calculating the rotation from the difference of the mouse position when it's pressed and the current removes the precision errors and fixes the problem.

Also starts the movement on the mouse events so other code like guis can intercept the event and the camera won't move while moving a slider for example

arturoc added a commit that referenced this pull request Jul 30, 2014
ofEasyCam: fixes floating point errors in rotation + events priority
@arturoc arturoc merged commit f9e5254 into openframeworks:master Jul 30, 2014
@arturoc arturoc deleted the bugfix-ofEasyCam branch July 30, 2014 15:56
@ofTheo
Copy link
Member

ofTheo commented Aug 1, 2014

Just curious, why do they need to be outside the class?

@arturoc
Copy link
Member Author

arturoc commented Aug 1, 2014

no need, they were declared out of the class before. I just changed them to make them static so they don't exist out of that file. Doesn't make any difference to declare them in or out the class really as long as they are static but feel free to change them

MartinHN pushed a commit to MartinHN/openFrameworks that referenced this pull request Dec 16, 2014
ofEasyCam: fixes floating point errors in rotation + events priority
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants