Game worlds are viewed from a camera, which is the viewpoint from which the game world is observed from.

learn more… | top users | synonyms

3
votes
3answers
5k 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 ...
3
votes
0answers
188 views

Web sites with famous game information? [closed]

Is there any website containing informations related with some famous game? For information I mean how to calculate damage in a rpg for example, or how they've set camera and other tips like this! ...
3
votes
2answers
1k views

How to fix issue with my 3D first person camera? [closed]

My camera moves and rotates, but relative to the worlds origin, instead of the players. I am having difficulty rotating the camera and then translating the camera in the direction relative to the ...
3
votes
0answers
1k views

OpenGL ES 2.0 Camera advices and general thoughts for a 2D engine [closed]

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
2answers
268 views

How does the Wii controller work?

I've never played the Wii or Kinect, but to my understanding, the Wii captures user movement with 4 cameras and translates them to controls. How does this work? Has Nintendo published anything on ...
2
votes
4answers
267 views

Moving camera, or camera with discrete “screens”?

I'm making a game with a friend, but having trouble deciding on a camera style. The basic idea for the game, is having a randomly generated 2-dimensional world, with settlements in it. These ...
2
votes
2answers
821 views

How to avoid gimbal lock

I am trying to write code with rotates an object. I implemented it as: Rotation about X-axis is given by the amount of change in y coordinates of a mouse and Rotation about Y-axis is given by the ...
2
votes
2answers
481 views

Restrict camera movements

I'm making a game with target (orbit camera). I want to limit camera movements when in room. So that camera don't go through walls when moving around target and along the ground. What are common ...
2
votes
2answers
193 views

Field of view settings for first person shooter

Are there any industry standards for setting the field of view (FOV) for FPS games or is it solely based on trial and error? Are there any guidelines for choosing the correct value?
2
votes
1answer
2k 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
2k 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 ...
2
votes
2answers
2k 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 ...
2
votes
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
127 views

3D Camera Rotation

Please, forgive me, but I need help and I've been stuck on this for a few weeks now, I'm making no progress and everywhere I go and I see a different answer, everything I try doesn't work. I've had ...
2
votes
1answer
200 views

Optimising out tiles outside of viewport

I am playing around with the HTML5 canvas and have begun implementing a tile engine. However, it's currently very inefficient: I have a 100x100 2D array and my code loops through the whole thing ...
2
votes
1answer
503 views

Why use 3d matrix and camera in 2D world for 2d geometric figures?

I'm working in XNA on a 2d isometric world/game and I'm using DrawUserPrimitives to draw some geometric figures... I saw some tutorials about creating dynamic shadows but I didn't understood why they ...
2
votes
2answers
226 views

Moving 2d camera in the y direction

I'm developing a simple game for the iphone and am struggling to work out the best way for the camera to follow the main character. The following picture hightlights the three main components: ...
2
votes
1answer
596 views

Rendering skybox in first person shooter

I am trying to get a skybox rendered correctly in my first person shooter game. I have the skybox cube rendering using GL_TEXTURE_CUBE_MAP. I author the cube with extents of -1 and 1 along X,Y and Z. ...
2
votes
1answer
135 views

Rotate Camera as an Object Manoeuvres

There are loads of questions (all of which I have looked at) on here about cameras following objects. Using them, I have successfully got my camera to follow my car when driving, but I am unable to ...
2
votes
4answers
187 views

How do I rotate a camera around the Y axis of the object it's looking at? [duplicate]

I'm making a camera that can currently rotate freely from the back to the front of a target object by giving it an angle and a distance. I do the above with the following code directionVector = ...
2
votes
3answers
1k views

How do I position a 2D camera in OpenGL?

I can't understand how the camera is working. It's a 2D game, so I'm displaying a game map from (0, 0, 0) to (mapSizeX, 0, mapSizeY). I'm initializing the camera as follow : Camera::Camera(void) : ...
2
votes
1answer
2k views

Game Maker: How do I make a score display move with the view?

I have drawn everything needed to the screen including a HUD for the score, but I have my room set to follow my player: When the camera follows the player, the score HUD stays doesn't scroll with him! ...
2
votes
1answer
302 views

Camera movement using WASD on x/z plane only

I've been wearing my enter key down on google searches - I have a camera script based on the MouseOrbit.js asset. That's all working fine, but in addition to the basic orbiting and the zooming that ...
2
votes
1answer
141 views

Difference between rotation methods?

My question is in about rotate methods in android.graphics.Camera. In Docs, I saw these comments: public void rotateX (float deg) Since: API Level 1 Applies a rotation transform around the X ...
2
votes
2answers
1k 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
768 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
509 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
1k 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
493 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
3k 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
192 views

Frustum culling with third person camera

I have a third person camera that contains two matrices: view and projection, and two Vector3's: camPosition and camTarget. I've read up on frustum culling and it makes it seem easy enough for a first ...
2
votes
1answer
744 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
3answers
3k views

How to add a scrolling camera to a 2D Java game?

I am attempting to create a game where the camera follows the player, always making sure the player is in the center of the screen. How would I go about this? This game is a 2D Java game, made with no ...
2
votes
1answer
560 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
403 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
3k 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
890 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
321 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
183 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
183 views

How to crop camera's viewport?

I'm making an Android game using LibGDX. I want to do something hard to explain but I'll try nonetheless. Look at this camera view (it's from 3ds max): I can get same exact view in LibGDX without ...
2
votes
1answer
207 views

Project collision shapes to plane for 2.5D collision detection

I am working on a top down 2.5D game. In the game anything that overlaps on the screen should be 'colliding' with each other regardless of whether they are on the same plane in the 3D world. This is ...
2
votes
1answer
152 views

First Person Camera strafing at angle

I have a simple camera class working in directx 11 allowing moving forward and rotating left and right. I'm trying to implement strafing into it but having some problems. The strafing works when ...
2
votes
2answers
181 views

Player jitter when positioned at large coordinate values

I am trying to make a simple top down scrolling shooter using Unity3D comprising of the following elements: 1) Top down orthographic camera: points at 65 degrees towards the ground. At a height of ...
2
votes
1answer
417 views

How to smoothly change the target of smooth follow without camera glitch?

I am trying to change the target of the smooth follow at runtime, but there is a glitch in the camera since the targets are different sizes. I tried using lerp and smooth damp both gave the same ...
2
votes
1answer
163 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
2answers
485 views

Camera frustum calculation coming out wrong

I'm trying to calculate a view/projection/bounding frustum for the 6 directions of a point light and I'm having trouble with the views pointing along the Y axis. Our game uses a right-handed, Y-up ...
2
votes
4answers
2k views

2D camera perspective projection from 3D coordinates — HOW?

I am developing a camera for a 2D game with a top-down view that has depth. It's almost a 3D camera. Basically, every object has a Z even though it is in 2D, and similarly to parallax layers their ...
2
votes
1answer
97 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
756 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 ...