Game worlds are viewed from a camera, which is the viewpoint from which the game world is observed from.
2
votes
1answer
387 views
3D zooming technique to maintain the relative position of an object on screen
Is it possible to zoom to a certain point on screen by modifying the field of view and rotating the view of the camera as to keep that point/object in the same place on screen while zooming ? Changing ...
2
votes
2answers
998 views
XNA Camera 2D confusion
I have followed the tutorial at http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/ to implement my 2D camera and everything works just fine. However this leaves me confused. ...
2
votes
1answer
552 views
2D Camera Acceleration/Lag
I have a nice camera set up for my 2D xna game. Im wondering how I should make the camera have 'acceleration' or 'lag' so it smoothly follows the player, instead of 'exactly' like mine does now. Im ...
2
votes
1answer
420 views
Smooth Camera Rotation around 90 degrees
I'm developing a third person 3D platformer in XNA. My problem is when I try to rotate the camera around the player.
I would like to rotate (and animate) the camera 90 degrees around the player. So ...
2
votes
3answers
899 views
How do I move a 2D top-down racing camera smoothly and show what's ahead of the player?
I'm trying to make a camera that follows a race car. Right now, I'm smoothing the camera movement out by moving the camera's position a fixed percentage lerp'ed from the camera's position to the car's ...
2
votes
1answer
460 views
Positions are “off” after adding a camera transformation (2d)
Game source code: https://github.com/dnguyen/Aurora
I am using this to create a 2D camera: http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/. After I added the transformation ...
2
votes
2answers
2k views
Camera field of view: 3D projections & trigonometry
Okay, here goes.
I have a camera at (Xc, Yc, Zc.) The Xc and Yc coordinates are latitude/longitude, and the Zc coordinate is an altitude in metres. I have a point at (Xp, Yp, Zp) and a field of view ...
2
votes
1answer
163 views
Unity3D Camera constantly moving
I'm trying to make my own first person camera controls in unity that use both thumbsticks on a joypad. I have this working fine. However, when I move the right thumb stick (the one uses to look left / ...
2
votes
1answer
278 views
Zoom In/Out Camera To Show Whole World
I am developing side scrolling game using AndEngine, and looking for additional camera control. I would like to view the whole level and then zoom/pan the camera to the left corner of the scene.
...
2
votes
1answer
396 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 ...
2
votes
1answer
308 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
1answer
2k views
How do I properly implement zooming in my game?
I'm trying to implement a zoom feature but I have a problem. I am zooming in and out a camera with a pinch gesture, I update the camera each time in the render, but my sprites keep their original ...
2
votes
2answers
733 views
Why is my quaternion camera rotating around strange axes?
I can't get it to work for the life of me. Its rotating the camera in the global coordinate system, or some other random coordinate system, not the camera local coordinate system. WASDEC work ...
2
votes
2answers
1k views
Why isn't my mouse input working as expected in a DX10 game?
I've made myself a camera for a DirectX 10 game, and the keyboard control works fine. However, I can't see to get the mouse to work. My biggest problem is I can't find out how to hide the mouse on the ...
2
votes
1answer
296 views
Does PushButton Game Engine have the notion of a Camera?
I am playing around a bit with the PushButton Engine for game development in Flash and have come across a need for a Camera like the Camera that follows Mario in Mario Games. Flashpunk has a nice ...
2
votes
2answers
153 views
Can't figure get the conversion from cartesian to spherical(“polar”) correctly for my orbiting camera
The two angles from the polar coordinate system are defined as hRotation and vRotation
This is how they are converted from polar to cartesian:
// Get the distance between the object and the ...
2
votes
1answer
98 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",
...
2
votes
1answer
91 views
Camera closes in on the fixed point
I've been trying to create a camera that is controlled by the mouse and rotates around a fixed point (read (0, 0, 0)), both vertical and horizontal. This is what I've come up with:
camera.Eye = ...
2
votes
1answer
621 views
Light mask map and camera for static lights in XNA Platformer
Using the example for some basic light maps found here : http://blog.josack.com/2011/07/xna-2d-dynamic-lighting.html, I've managed to create a lightmap texture using individual lightmaps and display ...
2
votes
1answer
255 views
Draw Bug 2D player Camera
EDIT *Along with the Palindromes helpful response, I found that my bug was because I was calculating the camera coordinates in terms of tiles instead of pixels which caused the irregular motion.*
I ...
2
votes
1answer
230 views
delay camera xna
I read this tutorial http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Camera_delay.php
but i didnot unsterstand it. Is there another way to delay the camera position movement without this ...
2
votes
1answer
370 views
Calculating camera zoom value (top-down)
I need some help in 'camera maths'. I have a birds eye view of two characters. One character is static and the other can move. I would like the camera to always show both characters in full and, in ...
2
votes
1answer
228 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 ...
2
votes
1answer
856 views
Obtaining a world point from a screen point with an orthographic projection
I assumed this was a straightforward problem but it has been plaguing me for days.
I am creating a 2D game with an orthographic camera. I am using a 3D camera rather than just hacking it because I ...
2
votes
0answers
150 views
Camera - View matrix in Android + openGLES 2
I am trying to use the touch screen on the tablet to control my camera movements and generate the view matrix accordingly.
I get the x and y coordinates of the screen and after doing some sanity ...
2
votes
1answer
206 views
C# 2D Camera Max Zoom
I have a simple ship sprite moving around the screen along with a 2D Camera.
I have zooming in and out working, however when I zoom out it goes past the world bounds and has the cornflower blue ...
2
votes
2answers
970 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 ...
2
votes
2answers
607 views
How to rotate an object so it stands correctly (back always facing the camera)
I have the following scene:
And I have two 3D vectors, the camera position, and the focus position. The focus vector is always behind the monster. I know how to rotate the camera around the focus ...
2
votes
0answers
172 views
Smooth Camera Offsets
I am attempting to implement a sort of, smooth camera that has angle offsets from the player as they turn, creating a cinematic effect as well as visual feedback for when the player turns.
Here is an ...
2
votes
0answers
910 views
OpenGL ES 2.0 Camera advices and general thoughts for a 2D engine
I'm working on my first 2D OpenGL engine for iOs 5+ using GLKit (that's to say: OpenGL ES 2.0).
While I am on a good path and a lot of things are implemented and nicely working, I'd like to share with ...
2
votes
0answers
823 views
AndEngine Making Chase Camera Follow Player
I am playing around with the AndEngine Race Game example. I am trying to make the camera follow the car as the player moves around. The Tile Map is larger than the player's screen but the camera ...
2
votes
1answer
579 views
Steady zoom on center in LWJGL (Modelview)
I am having a problem in LWJGL with zooming in and out. I am using glScaled(zoom, zoom, 1) before glTranslated. There are 2 problems:
1. The rate of zoom speeds up a lot when zooming out (lower zoom ...
1
vote
2answers
571 views
How do I have to take into account the direction in which the camera is facing when creating a first person strafe (left/right) movement
This is the code I am currently using, and it works great, except for the strafe always causes the camera to move along the X axis which is not relative to the direction in which the camera is ...
1
vote
2answers
415 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 ...
1
vote
2answers
209 views
Matrix camera, movement concept
Someone told me that the movement concept in my 2D game is bad. When left or right arrow is pressed I'm scrolling the background which makes you feel that player avatar is moving (the avatar's ...
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.
...
1
vote
1answer
81 views
Creating big scene and little size chasing camera
I would like to create a climb based game, so I need to have a big scene and a camera that cover only a little part of it and chase my player. This image explains easier what I want:
How can I do ...
1
vote
1answer
482 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.
...
1
vote
1answer
242 views
Implementing a camera on HTML5 canvas?
I am trying to work out the best way of implementing a camera in my simple 2d game.
The way it is structured at the moment is my game objects all have draw functions, which are passed a canvas ...
1
vote
1answer
168 views
Fixed texture size (Pixel) libgdx, java
If I resize the window (e.g. fullscreen) the texture size also changes!
I want that behaviour: If I change to fullscreen you will see more of the game world. The size (Pixel) of the texture stay the ...
1
vote
1answer
1k views
How do I create a bounding frustum from a view & projection matrix?
Given a left-handed Projection matrix, a left-handed View matrix, a ViewProj matrix of View * Projection - How do I create a bounding Frustum comprised of near, far, left, right and top, bottom ...
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 ...
1
vote
1answer
327 views
Strange 3D game engine camera with X,Y,Zoom instead of X,Y,Z
I'm using a 3D game engine, that uses a 4x4 matrix to modify the camera projection, in this format:
r r r x
r r r y
r r r z
- - - zoom
Strangely though, the camera does not respond to the Z ...
1
vote
3answers
69 views
How to put a “mask” in front of the camera in Ogre?
Is there any easy way to put kind of a "mask" in front of the camera in an Ogre 3d application, so that parts of the scene are always covered by that mask? The idea is that I want to have an effect as ...
1
vote
1answer
49 views
How to make camera rotation independent from frame rate?
I multiply the mouse movement by a given number to get camera rotation of a desired speed. But it only works at 60 FPS. When I don't limit the frame rate I get around 350 FPS and the camera rotation ...
1
vote
2answers
115 views
Accumulating rotations for camera
It seems there are three ways to store a camera's rotation: in angles, view matrix or quaternion. I was using euler angles since when I used a matrix it had a tendency to accumulate rounding errors ...
1
vote
1answer
181 views
How do I make camera follow the player within some bounds?
I am creating a simple ambient/explorer platformer. Because I want the player to only be able to see a new area once they have reached it, I decided to split up the world in rooms.
To not make things ...
1
vote
2answers
264 views
Frustum Culling/Only rendering what's viewed by the Camera in HTML5 Canvas?
I coded up a simple 2D Camera for my HTML5 Canvas-Based Game Engine but I noticed the performance wasn't very good. So a lot of people suggested only rendering things that are shown by the camera but ...
1
vote
1answer
945 views
Orbiting a specific point - Orbiting Camera
How would I create a camera that with the mouse, it allows you to orbit around a specifc position, with the camera always facing that point? I would also like it to be able to always be at a constant ...
1
vote
1answer
741 views
moving 2D camera
I've got a camera that places the character about a 1/4 way into the screen. The problem I'm having is that when the character moves left the character stays in place now placing the character 3/4 the ...

