Tagged Questions
2
votes
0answers
14 views
Extract smaller frustum from camera frustum?
Background:
I was thinking of implementing multiselection by performing a frustum culling on a sub-part of the screen.
Problem:
Given total screensize, a rectangle on the screen (pos, size), and ...
0
votes
1answer
80 views
gluLookAt strange behavior implementing camera
I'm having a super tough time trying to implement what I thought would be a very straightforward problem. I'm trying to demonstrate a free camera that can move forward/back, strafe left/right, fly ...
-1
votes
2answers
158 views
First person camera with Bullet Physics
Before integrating the Bullet Physics, the camera worked fine. But instead of using my own simple struct for transform data, I use rigid body structs provided by the physics library now.
There are ...
1
vote
1answer
347 views
How to implement a basic arcball camera in OpenGL with GLM
I only just started learning OpenGL and even things like vector maths etc a couple of days ago, so I am having a bit of trouble figuring out exactly what to do to implement an arcball camera system.
...
2
votes
1answer
88 views
Camera not strafing (GLSL)
I use this code in my GLSL vertex shader, where v_position is the vertex position:
gl_Position = v_position * u_camera;
and set u_camera as follows:
meshShader.setUniformMatrix("u_camera",
...
-1
votes
1answer
96 views
OpenGL glMatrixMode rotation
I'm stuck on trying to figure out how to rotate the viewport(or camera). So far I've figured out I need to use the function glRotatef and glMatrixMode(GL_MODELVIEW). But I have no idea how to apply ...
1
vote
1answer
297 views
OpenGL ModelView matrix
Hello I am trying to understand matrix operations behind OpenGL and I have some questions.
1- When we first create a simple window using glut and opengl, we use such a command below to draw a simple ...
0
votes
2answers
144 views
3D Camera manager tool – is there any?
Are there some libraries or example codes, of a camera manager – a tool, that would move camera using some smooth lines (bsplines or similar)? So basically I request an animation to move to a new ...
12
votes
1answer
193 views
Orthographic unit translation mismatch on grid (e.g. 64 pixels translates incorrectly)
I am looking for some insight into a small problem with unit translations on a grid.
Update and Solved
I solved my own issue. See below for details. Everything in this part of the post turned out to ...
1
vote
0answers
142 views
How do I convert my matrix from OpenGL to Marmalade?
I am using a third party rendering API, Marmalade, on top of OpenGL code and I cannot get my matrices correct. One of the API's authors states this:
We're right handed by default, and we treat y ...
3
votes
2answers
416 views
How to rotate camera centered around the camera's position?
Currently I am using gluLook at like so:
gluLookAt(position.x, position.y, position.z,
viewPoint.x, viewPoint.y, viewPoint.z,
upVector.x, upVector.y, upVector.z);
with the ...
43
votes
8answers
5k views
Why do we move the world instead of the camera?
I heard that in an OpenGL game what we do to let the player move is not to move the camera but to move the whole world around.
For example here is an extract of this tutorial: OpenGL View matrix
...
2
votes
1answer
372 views
OpenGL: Move camera regardless of rotation
For a 2D board game I'd like to move and rotate an orthogonal camera in coordinates given in a reference system (window space), but simply can't get it to work.
The idea is that the user can drag the ...
4
votes
1answer
856 views
Why the clip space in OpenGL has 4 dimensions?
I will use this as a generic reference, but the more i browser online docs and books, the less i understand about this.
const float vertexPositions[] = {
0.75f, 0.75f, 0.0f, 1.0f,
0.75f, ...
2
votes
1answer
300 views
Finding a suitable axis-angle to avoid gimbal lock
In OpenGL the camera faces the -z axis with the +y axis pointing up. I am using quaternions to represent the orientation of my objects (which works well) and am trying to do the same for the camera. I ...
2
votes
2answers
908 views
Panning with the OpenGL Camera / View Matrix
I'm gonna try this again
I've been trying to setup a simple camera class with OpenGL but I'm completely lost and I've made zero progress creating anything useful. I'm using modern OpenGL and the glm ...
4
votes
1answer
440 views
Issues implementing arcball viewer
My scene has a simple cube, and a camera built with the lookAt function (I'm using OpenGL). The scene renders fine, and I'm sure I have my model/view/projection matrices set up correctly.
Now I'm ...
-1
votes
1answer
312 views
Camera rotation not working right?
I'm new to game programming but I've read a lot of tutorials. I was just trying to make my own camera class but instead of the scene rotating around the camera, the camera stays stationary while ...
0
votes
1answer
571 views
Camera Rotation (for mouse look) with LookAt does not work as expected (Local/Global)
My code for rotating my 3D fps camera isn't working as expected.
I expect that the X-axis does rotate with the Y-axis, but it ain't so.
I made some pictures to explain it better, I think its doing ...
1
vote
1answer
1k views
OpenGL relative 2D camera
Some days ago, I've felt a need to add a camera to my game, it's a puzzle. That would let me move the board, zoom in and etc. This gave me control to do boards muuuch larger, soon, more complex ...
3
votes
3answers
6k views
How can I rotate a camera about it's target point?
I'm drawing a scene where the camera freely moves about the universe. The camera class keeps track of the view (or look at) point, the position of the camera, and the up vector. These vectors/points ...
11
votes
3answers
3k views
How do I implement a quaternion based camera?
UPDATE The error here was a pretty simple one. I have missed a radian to degrees conversion. No need to read the whole thing if you have some other problem.
I looked at several tutorials about this ...
2
votes
2answers
1k views
camera movement along with model
I am making a game in which a cube travels along a maze with the motive of crossing the maze safely. I have two problems in this.
The cube needs to have a smooth movement like it is traveling on a ...
1
vote
2answers
406 views
OpenGL Camera causes spatial distortion
I'm trying to implement a 3D camera of the "Orbit around the origin" variety in a game engine I'm developing in order to learn about 3D graphics and game programming. I have a basic handle on the ...
0
votes
2answers
416 views
CubeRealm OpenGL rotation problems, need help. :\
I'm totally new to OpenGL and I'm working on a Sandbox game called CubeRealm. My problem you see is rotation. I've got it in my head that to rotate the 'camera' I just rotate all the scene by the ...
1
vote
1answer
2k views
OpenGL 3D Camera
And here I am again, looking for help with my OpenGL camera once again. This is starting to get embarrassing. Anyway, here's the deal: I think my OpenGL First Person free roaming camera is starting ...
1
vote
1answer
3k views
OpenGL ES 2.0: Moving Camera in Orthogonal (2D) Projection
I have quite large 2D game scene. The scene is much larger than the screen of the LCD. Therefore, I have to move the camera (view) in desired directions, to display particular parts of the scene.
...
2
votes
1answer
225 views
Why doesn't the y Axis work with SuperBible frame reference or GluLookAt
I'm currently trying to understand how to use the GLFrame Class in the superbible book, and acording to the 4th edition of the book, the camera matrix derived from the Frame of reference class should ...
9
votes
2answers
6k views
converting a mouse click to a ray
I have a perspective projection. When the user clicks on the screen, I want to compute the ray between the near and far planes that projects from the mouse point, so I can do some ray intersection ...
3
votes
2answers
1k views
Implementing camera for 2d side scroller game?
I'm implementing a 2D side scroller for iOS (using C/C++ with OpenGL) (beat'em up style like double dragon/final fight ).
My scenes are composed of one cyclical background image ( the end of the ...
3
votes
3answers
4k views
Camera Rotation using angles
I currently try to rotate a camera (using gluLookAt()) around a point , i successfully do it for rotating around one global axis.
But when i want to use more than one axis , I'm stuck . I've ...
