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

learn more… | top users | synonyms

1
vote
1answer
95 views

Dealing with field of view when zooming into a terrain from a height

I'm creating a tech demo featuring a small planet. The problem I'm having is that the planet doesn't really feel like the right "scale" when the camera in down on the surface, I think it could be the ...
0
votes
1answer
529 views

Use of FlxG.camera.follow to follow a character vertically

I am developing a prototype for a game in Flixel in which a character floats upward continually to traverse the level. I would like to have a "tall" layout for levels and set the FlxG.camera to follow ...
2
votes
0answers
55 views

resizing directx control so that more of my object's environment is visible [closed]

I'm very new in 3D. I have a DirectX control which I want to be able to resize. A 3D object is shown in the control. On resize, I would like that object to stay the same size, only more of its ...
1
vote
1answer
822 views

XNA - moving the 3rd person camera

I'm having following problem: Can't set my camera to follow object from behind and rotate when I use left/right arrow. I've tried different tutorial and examples but it still doesn't work for me. ...
11
votes
4answers
3k views

Cast ray to select block in voxel game

I am developing a game with a Minecraft-like terrain made out of blocks. Since basic rendering and chunk loading is done now, I want to implement block selecting. Therefore I need to find out what ...
2
votes
1answer
154 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 ...
6
votes
5answers
971 views

FPS games: don't they have unrealistic one-eyed view? What are the causes?

I have played many fps games, and noticed that the camera perspective is similar to the 'one eyed view' of the surroundings. It does not feel like bilinear. :/ Is it because of the single flat view ...
1
vote
1answer
560 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 ...
0
votes
1answer
759 views

XNA - move camera over tilemap

I am trying to build a game based on Advance Wars in XNA. I am so far where the tiles are placed on the screen, except here starts my problem. During the game, I ofcourse want to move the camera ...
-1
votes
1answer
209 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 ...
13
votes
2answers
3k views

Implementing a camera / viewport to a 2D game

What is the most practical way to implement camera/viewport to a 2D-game? I've read, that I should store the object world position instead of position relative to the screen? Current situation: I ...
1
vote
1answer
461 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 ...
6
votes
1answer
359 views

Swaying Camera when Walking

You can see the effect in many games. The camera sways or wiggles a bit while walking to make the movement feel more realistic. I have implemented a camera in my game. (Who'd have thunk it?) So is ...
3
votes
1answer
690 views

Blender Object Appearing Gray when all Lights are Off

I have an issue with Blender where, when I turn my only light off (a sun lamp) and render the image my object appears gray rather than black (and thus, not appear to the camera). I can't figure out ...
2
votes
1answer
635 views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
4
votes
1answer
143 views

Why does CameraZ=0 result in no render?

I am trying to draw simple model, but I am experiencing strange error. When I use this View matrix: Matrix.CreateLookAt(new Vector3(0, 200, 1), new Vector3(0, 0, 0), Vector3.Up); my model is drawn ...
0
votes
2answers
838 views

Making a Camera look at a target Vector

I have a camera that works as long as its stationary. Now I'm trying to create a child class of that camera class that will look at its target. The new addition to the class is a method called ...
-1
votes
1answer
263 views

How to create GoogleMaps-like camera for simple 2D strategy game? [closed]

I am just starting in game development (with web programming background). I want to know how to create 2D game with camera that can zoom in/out and can be moved like map in Google Maps. Could you help ...
1
vote
1answer
91 views

XNA 3D coordinates seem off

I'm going through a book, and the example it gave me seems like is should work, but when I try and implement it, it falls short. My Camera class takes three vectors in to generate View and Projection ...
0
votes
2answers
289 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 ...
2
votes
4answers
4k 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 ...
13
votes
1answer
463 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
295 views

Drawing two orthogonal strings in 3d space in Android Canvas?

I want to draw two strings in canvas. The first string must be rotated around the Y axis, for example 45 degrees. The second string must start at the end of the first string and also it must be ...
2
votes
3answers
6k 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
418 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 ...
0
votes
1answer
242 views

Stage3D: Camera pans the whole screen

I am trying to create a 2D Stage3D game where you can move the camera around the level in an RTS style. I thought about using Orthographic Matrix3D functions for this but when I try to scroll the ...
1
vote
1answer
212 views

Camera lookAt target changes when rotating parent node

have the following issue.I have a camera with lookAt method which works fine.I have a parent node to which I parent the camera.If I rotate the parent node while keeping the camera lookAt the target , ...
1
vote
0answers
225 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 ...
5
votes
2answers
3k 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 ...
0
votes
0answers
145 views

Keep 3d model facing the camera at all angles [duplicate]

I'm trying to keep a 3d plane facing the camera at all angles but while i have some success with this: Vector3 gunToCam = cam.cameraPosition - getWorld.Translation; Vector3 beamRight = ...
0
votes
2answers
6k views

How to add isometric (rts-alike) perspective and scolling in unity?

I want to develop some RTS/simulation game. Therefore I need a camera perspective like one knows it from Anno 1602 - 1404, as well as the camera scrolling. I think this is called isometric perspective ...
2
votes
4answers
353 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 ...
56
votes
9answers
17k 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 ...
3
votes
1answer
600 views

Panning a 3d viewport in 2d direction with rotated camera

I am using below code to pan the viewport (action script 3 code using flare3d framework) _mainCamera.x-= Input3D.mouseXSpeed; _mainCamera.z+= Input3D.mouseYSpeed; Where as Input3D.mouse[X|Y]Speed ...
1
vote
0answers
195 views

Camera not staying behind model while moving in circle

I have a camera behind a model (3rd Person) and I'm having problems KEEPING it behind the model. When I first start my game, you see the back of the model. If the model moves forward, backward or ...
0
votes
1answer
254 views

Limit the amount a camera can pitch

I'm having problems trying to limit the range my camera can pitch. Currently my camera can pitch around a model without restriction, but having a hard time trying to find the value of the ...
1
vote
1answer
152 views

Camera wont stay behind model after pitch, then rotation

I have a camera position behind a model. Currently, if I push the left thumbstick making my model move forward, backward, or strafe, the camera stays with the model. If I push the right thumbstick ...
2
votes
1answer
1k views

2d game view camera zoom, rotation & offset using 'Filter' / 'Shader' processing?

I wish to add the ability to zoom-in, zoom-out, rotate and move the view in a top-down view over a collection of points and lines in a large 2d map. I split the map into a grid so I only need to ...
7
votes
2answers
650 views

Rotate a vector

I want my first-person camera to smoothly change its viewing direction from direction d1 to direction d2. The latter direction is indicated by a target position t2. So far I have implemented a ...
4
votes
1answer
373 views

How do I calculate the boundary of the game window after transforming the view?

My Camera class handles zoom, rotation, and of course panning. It's invoked through SpriteBatch.Begin, like so many other XNA 2D camera classes. It calculates the view Matrix like so: public Matrix ...
2
votes
1answer
100 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 = ...
0
votes
1answer
50 views

Camera changes view when controller connected

I have a weird situation. I have a model set to 0 for X,Y and Z. My camera's position is set to: 0 (X-value, but updates when the model moves around) the model's height + 20f (about the same level ...
1
vote
1answer
515 views

Pitch camera around model

Currently, my camera rotates with my model's Y-Axis (yaw) perfectly. What I'm having trouble with is rotating the X-Axis (pitch) along with it. I've tried the same method for cameraYaw() in the form ...
1
vote
1answer
328 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 ...
2
votes
1answer
699 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 ...
0
votes
1answer
123 views

Connect camera class to game

I've been following a tutorial on making a free camera for a 3D model. What the camera class does is allow the player to move and rotate in respects to the model's current position using the right ...
1
vote
1answer
529 views

Why does my 3D model not translate the way I expect? [closed]

In my first image, my model displays correctly: But when I move the model's position along the Z-axis (forward) I get this, yet the Y-axis doesnt change. An if I keep going, the model disappears ...
2
votes
2answers
695 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 ...
1
vote
2answers
248 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 ...
4
votes
2answers
264 views

Render a 3D scene in multiple windows - extended panoramic view

Is there any resource location on how to view a 3D scene from an application or a game on multiple windows or monitors? Each window should continue drawing from where the neighbouring one left off (in ...