Force Camera Rotation

Started by Kernle 32DLL, March 28, 2011, 11:05:32 PM

Previous topic - Next topic

Kernle 32DLL

Hi,

Is there a way I may have overlooked to "forcerotate" a camera? What I mean is essentially forcing a certain rotation opon the camera, instead rotation it piece by piece via rotateX/Y/Z. I was able to "emulate" that behavior with an Object3D, but the first method is missing for the camera object, so it wont work this way:

mWorldObject.clearRotation();
mWorldObject.rotateY((float)Math.toRadians(mWorldRotationY));


So, any toughts, or did I overlook something?

So long,
Kernle

EgonOlsen

It's almost the same thing:


mWorldObject.getCamera().getBack().setIdentity();
mWorldObject.getCamera().rotateY((float)Math.toRadians(mWorldRotationY));

Kernle 32DLL

Tahnks! Exact the thing I was looking for (except for mWorldObject, which is a Object3D, and not the world, but I got your idea ;-))