Questions tagged [camera]

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

Filter by
Sorted by
Tagged with
2 votes
2 answers
7k 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 ...
noddy's user avatar
  • 647
5 votes
2 answers
625 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 ...
user10329's user avatar
  • 135
1 vote
1 answer
713 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 ...
markmnl's user avatar
  • 619
4 votes
1 answer
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 ...
Jason's user avatar
  • 461
7 votes
3 answers
393 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 ...
Paul Manta's user avatar
  • 3,177
-1 votes
3 answers
529 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?
Luis C's user avatar
  • 11
6 votes
3 answers
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 ...
Setheron's user avatar
  • 596
5 votes
3 answers
1k 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 side....
Brian's user avatar
  • 51
0 votes
1 answer
311 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 ...
subb's user avatar
  • 285
2 votes
2 answers
954 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 ...
rjacks's user avatar
  • 138
0 votes
2 answers
718 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 ...
VoidElite's user avatar
-5 votes
1 answer
533 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 ...
WaterBearer's user avatar
7 votes
1 answer
2k 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. ...
Skoder's user avatar
  • 367
1 vote
1 answer
933 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 ...
dbomb101's user avatar
  • 950
5 votes
1 answer
5k 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 ...
Bert 's user avatar
  • 53
1 vote
1 answer
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 ...
Grimless's user avatar
  • 324
4 votes
1 answer
5k 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. ...
Bunkai.Satori's user avatar
0 votes
1 answer
364 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 ...
user avatar
7 votes
2 answers
1k views

Portal Projection

Ok ok I admit, I'm bored and toying with a portal script like the one on steam. I've figured out the following: relative positioning of the mirrored cameras render to texture for the portal (the ...
brandon's user avatar
  • 3,859
0 votes
1 answer
862 views

How do I open the camera in a CCScene node in a Cocos2D application?

I am new to Cocos2D and I can't find the way to open the camera from the library. I want to open the camera in the my game, can any one help me with with this? Thank you in advance.
NIKHIL's user avatar
  • 117
1 vote
1 answer
962 views

FlxSprite ignore camera follow in flixel

I am using flixel v2.5 and am using FlxG.camera.follow to get the camera to follow the player. I have a background FlxSprite ...
Adam Harte's user avatar
  • 2,444
1 vote
1 answer
161 views

Looking for online resources to understand game camera properties

What are some good online resources to understand game camera properties, such as fov, aspect-ratio and more?
wizztjh's user avatar
  • 131
2 votes
1 answer
626 views

Why are my 2D positions "off" after adding a camera transformation in XNA?

My game's source is on github. I am following this tutorial to create a 2D camera. After I adding the transformation to the SpriteBatch, all of my positions seem to be "off" when I move the ship (and ...
Dylan Nguyen's user avatar
5 votes
2 answers
2k views

Recommended 3D camera settings and model sizes for an FPS

I'm making a simple FPS and I can't decide on the size of my models and my camera settings. Could someone please recommend a good combination of: camera field of view near and far planes model ...
User not found's user avatar
5 votes
4 answers
3k views

From camera coordinates to world coordinates

I want to calculate world coordinates from camera coordinates. However, I seem to have problems with my understandings of how matrices in HLSL work. From world to camera is clear: ...
Etan's user avatar
  • 607
2 votes
1 answer
335 views

How do I implement a Camera in the PushButton Game Engine?

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 ...
Omkar's user avatar
  • 121
2 votes
1 answer
941 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 ...
Skoder's user avatar
  • 367
2 votes
1 answer
289 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 ...
optician's user avatar
  • 297
3 votes
2 answers
450 views

Silverlight scrolling with camera

I'm trying to get my head around scrolling a 2D map that uses a physics engine. If I was to launch a projectile, would I actually be applying the physics to the background images rather than the ...
Skoder's user avatar
  • 367
11 votes
5 answers
7k views

Camera Control Techniques in Games

I am an MPhil student in Computing Science working on the problem of camera control in graphics. Though the literature of camera control dates back to the end of 1980s, the majority of them (up to my ...
Promather's user avatar
  • 211
3 votes
3 answers
914 views

2D XNA game Camera issue

I'm currently making a 2D Worm-clone in XNA, and have regrets about the way I've made my camera. I declare my camera in my Main class and the camera follows the player. In my draw I then begin my ...
Benixo's user avatar
  • 669
8 votes
5 answers
6k views

Equation for bouncing graph?

I basically want my camera in 3D move automatically. Currently, I have linear movement which is rather dumb, so I'd like to do a bouncing movement. However, what is a good equation for bouncing? I ...
pimvdb's user avatar
  • 693
3 votes
2 answers
3k views

Help me get my 3D camera to look like the ones in RTS

I am a newbie in 3D game development and I am trying to make a real-time strategy game. I am struggling with the camera currently as I am unable to make it look like they do in RTS games. Here is my ...
rFactor's user avatar
  • 671
18 votes
2 answers
25k views

How can I convert 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 ...
Will's user avatar
  • 6,977
4 votes
1 answer
433 views

Handling cameras in a large scale game engine

What is the correct, or most elegant, way to manage cameras in large game engines? Or should I ask, how does everybody else do it? The methods I can think of are: Binding cameras straight to the ...
Hannesh's user avatar
  • 981
4 votes
2 answers
381 views

How do I get started with fog type effects in a first person game?

Hey guys, I'm currently using JME3 to learn 3d game development in java, and I have run into a situation. I would like to add fog effects to my games, but I don't even know where to start to implement ...
Dream Lane's user avatar
3 votes
1 answer
850 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. ...
brainydexter's user avatar
4 votes
1 answer
1k views

Improving first person camera and implementing third person camera

I want to improve upon my first person camera implementation and extend it to, so the user can toggle between third person/first person view. My current setup: draw():: ...
brainydexter's user avatar
3 votes
2 answers
3k 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 ...
Mr.Gando's user avatar
  • 575
37 votes
1 answer
7k views

Mouse aim in an FPS

I would like to make a First Person Shooter and move the camera with the mouse. The problem is that when the cursor reaches the limits of the screen, the camera won't turn anymore. How can I keep the ...
BlackBear's user avatar
  • 506
3 votes
1 answer
4k views

Calculating camera frustum planes using existing matrix

I'm trying to get basic frustum culling against an AABB working, and I'm having a bit of trouble figuring out how to extract the frustum planes from my camera's transform matrix. All the example code ...
Branan's user avatar
  • 211
1 vote
2 answers
1k 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 ...
Chris's user avatar
  • 370
5 votes
1 answer
3k 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 ...
vargonian's user avatar
  • 829
6 votes
3 answers
7k views

Why / how does XNA's right-handed coordinate system effect anything if you can specify near/far Z values?

I am told repeatedly that XNA Game Studio uses a right-handed coordinate system, and I understand the difference between a right-handed and left-handed coordinate system. But given that you can use a ...
vargonian's user avatar
  • 829
4 votes
1 answer
9k views

3D Ray Casting / Picking

I am not sure if I should post this link, but I feel this falls into game development just as much as it does math. I have a ray cast's far and near values and I am trying to calculate the end point ...
Chris's user avatar
  • 370
4 votes
1 answer
399 views

3D Camera Problem

I allow the user to look around the scene by holding down the left mouse button and moving the mouse. The problem that I have is I can be facing one direction, I move the mouse up and the view tilts ...
Chris's user avatar
  • 370
25 votes
2 answers
4k views

Mega Man-style screen scrolling design

The NES classic Mega Man series uses a very specific scrolling technique that I'm having a hard time wrapping my head around implementing. Essentially, the level is divided into "screens" which are ...
Zack The Human's user avatar
5 votes
3 answers
3k views

What does it mean to "strafe" the camera?

I'm looking at a tutorial in which both the terms camera moving and "strafing" are used. I looked onto dictionary.com and found: strafe verb (used with object) 1. to attack (ground troops or ...
andandandand's user avatar
2 votes
2 answers
233 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: ...
user avatar
3 votes
2 answers
3k views

3D camera implementation

I've been bashing my head against the concept of a 'camera' for my 3D world for some time now, and I'm not sure I'm doing this right anymore. Maybe I've been working on this for too long and have ...
Grimless's user avatar
  • 324