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
342 views

How to prevent 2D camera rotation if it would violate the bounds of the camera?

I'm working on a Camera class and I have a rectangle field named Bounds that determines the bounds of the camera. I have it working for zooming and moving the camera so that the camera cannot exit its ...
3
votes
1answer
336 views

Should the camera's rotation value be clamped?

I noticed that when writing a camera for my 2D game that the camera rotational value of -6 and 6 is equivalent to 0. That is, -6 = -12 = -18 = -24 = 6 = 12 = 18 = 24. I was wondering if it was ...
2
votes
1answer
318 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
0answers
1k 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 ...
0
votes
1answer
227 views

How to move the camera in XNA only after few moments?

I made the camera position 10 units from an object, but not behind it. I dont want the camera position behind the object right away when it rotates, I want that when I will rotate the object, the ...
4
votes
1answer
706 views

Perspective projection with 90 degrees between X-Y axis?

I'm trying to create a game that mimics Tibia's projection style: , As you can see, a 3d point is mapped to 2d like this: So I've downloaded Three.JS and a lib to create a Orthographic Camera. But ...
5
votes
2answers
2k views

Detect if a sprite has left the camera in libgdx?

Is there a method to know if a sprite has left the camera of the stage? or I have to do my operations? :P
2
votes
2answers
289 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 ...
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
431 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 ...
5
votes
2answers
1k views

What's a pre-multiplied 4x4 matrix?

I'm using a 3d game engine, that uses a 4x4 matrix to modify the camera projection. The matrix is in the regular 4x4 format: r r r x r r r y r r r z - - - zoom The description for the ...
3
votes
1answer
226 views

Is there a standard camera position / orientation?

I've come across a need to position a camera for an arbitrary (unknown) scene. The camera can be updated later, but I thought I'd give it a reasonable default, and the thought crossed my mind that ...
4
votes
1answer
747 views

How can I achieve a zoom-like camera effect?

I have a top down 3D camera: view = Matrix.CreateLookAt(new Vector3(0,0,20), Vector3.Zero, Vector3.Up); Now I want to achieve the effect like when I zoom in the scene and only show a section at the ...
4
votes
1answer
354 views

Getting the Bounds of a 2D Cameras View with Zoom

I am using a 2D camera, which does rotations and zoom. Currently, I am using the following to get my MinX, MinY, MaxX and MaxY... public float MinX { get { return ...
7
votes
1answer
485 views

Design of a camera system

Thinking about a common game, doesn't matter the type of the game, it's very likely that we need some camera type. For example: Debug camera: controlled by keyboard and mouse, with that we are able ...
2
votes
2answers
995 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 ...
3
votes
1answer
1k views

Can a 4x4 matrix describe a camera's perspective?

I'm working with a closed-source 3D engine, and it only allows you to set the view projection via a 4x4 matrix. Can this matrix describe the camera's translation, rotation & perspective? I turned ...
1
vote
2answers
408 views

Creating a rotation offset based on camera position with XNA

I have an XNA project where characters have the ability to pick up and move objects around (in 3d). When an object is picked up by a character, I want ithe objects position to always be out in front ...
8
votes
4answers
14k views

How can I orbit 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 ...
2
votes
1answer
1k 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 ...
14
votes
5answers
1k views

Creating my own kill cam

I plan on creating my own kill cam system for a sandbox tool set. After thinking about the mechanics of the kill cam itself, however, I'm quite lost. I'm trying to recreate the ones commonly seen in ...
2
votes
1answer
540 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 ...
1
vote
1answer
118 views

What game systems exist which uses camera input?

The group and I is in the middle of a semester project where we are currently researching on which game systems are using camera as input or as an interactive medium? We would like some help listing ...
5
votes
3answers
3k views

Determine corners of a specific plane in the frustum

I'm working on a game with a 2D view in a 3D world. It's a kind of shoot'em up. I've a spaceship at the center of the screen and i want that ennemies appear at the borders of my window. Now i don't ...
7
votes
3answers
6k views

How should I implement a first-person camera?

I'm a beginner programmer and I'm creating a project which allows me to walk around rooms via a first person camera. So far, I have the buildings drawn and on, but now I'm stuck and don't know how to ...
13
votes
3answers
6k 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 ...
5
votes
2answers
1k views

Why is my Unity camera chasing player script running slow?

I have a camera class, that is suppose to chase my player, which works, but its really really slow. It only has this line of code, which makes sense to me, player moves, camera moves. Any idea of why ...
2
votes
2answers
2k 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 ...
5
votes
1answer
601 views

How can I implement view wobble when my player is running?

I'm creating a FPS in XNA. So far its' going great. What I'm looking at doing is replicating the camera movements that you see in Modern Warfare. So, if you are walking the camera stays pretty ...
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 ...
7
votes
1answer
442 views

In a scrolling 2D game, should the objects move or should the camera move?

I'm new to game design and don't really know how things are done. I'm thinking of building an iOS game where a ship has to fly as high up as possible (at variable speeds), collecting power ups, et ...
2
votes
2answers
3k 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 ...
5
votes
2answers
546 views

Manipulating a free camera

I have a camera class in my code which stores two 4x4 matrices. One for the view matrix and one for the projection matrix. Originally, I had two floats in the class for pitch and yaw and these were ...
1
vote
1answer
573 views

XNA 3rd Person Camera - pitch reverses when facing backwards?

I have a 3rd person camera which rotates around the Y axis fine (yaw) and when I am facing forward (0, 0, -1) moving the mouse up moves the camera up and down great. But the more I turn the player and ...
4
votes
1answer
2k views

How can I track a falling ball with a camera?

I have been trying to get my camera to follow a falling ball but with no success. here is the code float cameraY = (FrustumHeight / 2)+((ball.getPosition().y) /2) - (FrustumHeight /2); ...
7
votes
3answers
330 views

How does the camera/UI know who the player is?

I'm in a bit of a dilemma regarding how certain engine components — like camera and UI — know who to follow, whose health and other attributes to represent on the screen. How do you ...
-1
votes
3answers
427 views

Move camera on X and Z only

How would you implement movement on a camera in order to always move it on X and Z coordinates, and if the camera has pitch yaw or roll it still moves only in those coordinates and doesn't fly up?
6
votes
3answers
2k views

XNA 4.0: 2D Camera Y and X are going in wrong direction

I asked this question on stackoverflow but assumed this might be a better area to ask it as well for a more informed answer. My problem is that I am trying to create a camera class and have it so ...
0
votes
2answers
1k views

UDK: Sidescrolling Camera not working

I tried the sidescrolling camera from http://udn.epicgames.com/Three/CameraTechnicalGuide.html#Example%20Side-Scrolling%20Camera but there are some warnings ...
4
votes
3answers
604 views

Zelda LttP (Super Nintendo) room changes?

I'm trying to make a tile-world adventure game on iOS similar to Zelda Link to the Past on SNES, and one issue I've run into is having my camera move beyond walls revealing the rooms on the other ...
0
votes
1answer
220 views

3D Camera control in DCC

I'm trying to build a simple world editor and I would like to implement a camera similar to what's used in 3ds Max, Maya or even Unity. From what I can figure out from Unity, the panning behavior ...
1
vote
2answers
544 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
518 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 ...
-5
votes
1answer
434 views

How to create a camera hack for a Torque 2D game?

first I’m not programmer, I’ve been using a popular game for some time and I think it would make a great medium for machinima. Problem is that it’s a top down view startegy game and it doesn’t give ...
7
votes
1answer
911 views

Scrolling a WriteableBitmap

I need to simulate my background scrolling but I want to avoid moving my actual image control. Instead, I'd like to use a WriteableBitmap and use a blitting method. What would be the way to simulate ...
1
vote
1answer
874 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 ...
5
votes
1answer
3k views

Mouse location is off due to camera

I'm building a top down shooter but I have a little issue with my camera and mouse. When I add the camera that I use to my game (see here) my mouse pointer seems to be in the wrong location. When I ...
1
vote
1answer
3k 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 ...
4
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. ...
0
votes
1answer
321 views

Conversion from matrix defining rotation and position to camera matrix

I have a matrix that defines the rotation and translation of an object, relative to (0, 0, 0). Assuming that the identity matrix defines the camera to be at (0, 0, 0) pointing at (0, 0, 1), how would ...