Rotate camera with current up axis

Started by moyosa, January 20, 2015, 11:19:18 PM

Previous topic - Next topic

moyosa

Here's one of my crazy examples/problems

When my camera is horizontal this works just fine.
cam.rotateCameraY((float) Math.toRadians((double) rotY));

But with my gyroscope I'm changing the camera rotation. So I probably need the current up axis.

So I've tried this. cam.rotateCameraAxis(cam.getUpVector(), (float) Math.toRadians((double) rotY));

But thats not giving me the right results...

Thanks.

EgonOlsen

QuoteBut thats not giving me the right results...
...that's a bit vague. Have you printed out the vector that you are getting from getUpVector()? How does it differ from what you expect?