Rotating Camera

Hello all,
I am new to OpenGL ES and PVR SDK.
I created a simple cube shape and I’m able to see the front face of cube (the Square).
I want to see all sides of the cube by moving the camera(or objects) like in a FPS game (LEFT arrow- rotate left, UP arrow - rotate up etc…).
There are few examples in pvr sdk, but they appear to be complex for me.
Can anybody provide me a solution or a working code in pvr framework to achieve this task?
Thank you.


If you are just starting with these concepts and/or graphics graphics, I would suggest trying to wrap your head around the concepts and the math with tutorials and explanations as much as possible, as trying to reverse-understand the more complicated camera math from code without already knowing what to expect might be challenging.
We do have a rather easy to follow FPS camera implementation in PVRCore - you can find it in (framework/PVRCore/cameras/FPSCamera.h). I do not think we are currently using it in any of the examples, take a look there. We also have 3rd person cameras (classic and orbit).

I wish you luck with your new endeavours in the wondrous world of graphics!

P.S. In case you need a bit more help understanding our camera, I am adding an explanation of what it does and how to use it:
“Cameras” in general, in the context of most graphics applications, will provide you with the “View” matrix, a matrix that is responsible for taking objects from an (arbitrary) World coordinate system and translating them to “View” space (I can explain more or point you to some tutorials if you wish). The way we are doing this, is that you are using the camera to track the movements of an object by calling functions such as “move”, “pitch” (turn up/down), “yaw” (turn left/right) etc. each frame, and then you call “getViewMatrix” to get your View matrix (which you then need to combine with your Projection and World matrices).

1 Like

Thank You Gerry :slight_smile:
I am going through the required tutorials. Once I’m done, i will try to implement this.

© Imagination Technologies Limited. All rights reserved.
Privacy PolicyTerms & ConditionsTrademarksCookies