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

Tilting Sphere and Changing Spin Axis #50

Open
Source-41 opened this issue Aug 23, 2016 · 1 comment
Open

Tilting Sphere and Changing Spin Axis #50

Source-41 opened this issue Aug 23, 2016 · 1 comment

Comments

@Source-41
Copy link

Is it possible to change the spin axis of the sphere and tilt the sphere to that spin axis? Example would be tilting north and south pole 5 deg forward and then spinning on the new north and south pole.

@mayakraft
Copy link
Owner

So sorry for missing this!
If I understand it correctly I was able to do this by adding one rotate command before the glMultMatrixf(_attitudeMatrix.m) line, around line 200.

glRotatef(5, 0, 0, 1);  // 5 degrees around z axis, can also do x axis
glMultMatrixf(_attitudeMatrix.m);

this makes it so when we pan around our Y axis, the world rotates around its new 5 degree axis, so the mapping is off by 5 degrees

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

No branches or pull requests

2 participants