The viewpoint from which the game world is observed from.
44
votes
9answers
5k 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
...
0
votes
1answer
42 views
Drawing the same scene with perspective then orthographic projections
I have a scene that I'm rendering first with a perspective matrix. I then want to rerender it in a different viewport using an orthographic matrix for a top-down 2D view of the scene. I think I may be ...
0
votes
1answer
158 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 ...
3
votes
2answers
67 views
Extract smaller frustum from camera frustum?
Background:
I was thinking of implementing multiselection by performing a frustum culling on a sub-part of the screen.
Problem:
Given total screensize, a rectangle on the screen (pos, size), and ...
0
votes
1answer
46 views
What values to construct “Projection Matrix” from?
I am curious to what standard values I should use to create a camera's projection matrix, as well as if certain measurements need to be taken if I want to represent a very small world or a very big ...
4
votes
2answers
170 views
Perfect FPS camera angle
I am making a multiplayer FPS and I am in search of some helpful tips on the perfect FPS camera angle. Because it is a multiplayer, I am making a full body model holding the gun, I find, however, that ...
1
vote
3answers
55 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 ...
0
votes
1answer
112 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 , ...
5
votes
2answers
156 views
What perspective is suitable for sharing a screen across a table?
I'm thinking about a 2 player 2D arena game for a mobile phone, but I have the obvious problem of gripping. To avoid this, I think it shouldn't be a problem to play one in front of the other with ...
1
vote
1answer
45 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 ...
0
votes
2answers
68 views
Moving camera along generated terrain?
I'm generating my terrain on the GPU, using diamond square subdivision (no height map involved). How can I anchor the camera's position to always be on top of the generated terrain?
Thanks
0
votes
2answers
38 views
Min. Distance for Spotlights in Ogre3d?
I have a simple scene with only one empty box. Within that box I have the camera attached to a scene node, which the user can move (translate/rotate). Additionally a spotlight is attached to the ...
1
vote
1answer
46 views
3D Camera raytracing (PSM SDK) [duplicate]
I am currently creating a 3D Camera on the Playstation Mobile SDK (which is basically openGL with just a little bit of abstraction).
The game I am trying to make is a 3D Tactical. That means my world ...
5
votes
3answers
901 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 ...
5
votes
2answers
276 views
How do I keep my character centred on screen?
I am making a game similar to Legend of Zelda: Link to the Past (top-down 2D action-adventure). I want the character to stay centred on the screen when he moves.
Currently, whenever the player wants ...
-1
votes
2answers
166 views
First person camera with Bullet Physics
Before integrating the Bullet Physics, the camera worked fine. But instead of using my own simple struct for transform data, I use rigid body structs provided by the physics library now.
There are ...
0
votes
0answers
53 views
How to choose a camera angle for top view game
I am stuck at choosing the 'best' camera angle for a top view game :
The camera should be showing so little details just like what Boxhead provides
Also the Camera angle should be similar to what ...
0
votes
1answer
54 views
XNA Camera Positioning All Wrong
I've been working in 3DSMax for years now and decided to give XNA 4.0 a try. I've got the majority of it working, however the camera is being a pain to me and I can't discern what's gone wrong. I ...
2
votes
1answer
123 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!
...
1
vote
2answers
260 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 ...
1
vote
1answer
73 views
Weapon as camera's child, rotation messed up
I put my weapon as a camera child, it works, but when i rotate my player it seems the weapon rotate a little too.
I'll attach some images so you can see it.
As you can see, when i look up i ...
0
votes
1answer
85 views
gluLookAt strange behavior implementing camera
I'm having a super tough time trying to implement what I thought would be a very straightforward problem. I'm trying to demonstrate a free camera that can move forward/back, strafe left/right, fly ...
1
vote
1answer
110 views
relationship between eye height and collision body in UDK
We are using the UDK in a research lab setting so we must understand exactly how tall users feel in the virtual world (camera position). By Googling and digging through code, we have discovered the ...
11
votes
2answers
683 views
How to blend two cameras when traveling through a portal in Unity3D
Before I get to my question, I know the most obvious solution would be to use the normalized view port rect, however I need more complex shapes than a rectangle, and I've looked in to using the view ...
0
votes
2answers
563 views
Unity3D 3.5 pro - Moving the camera vs setting draw distance
I move the camera mostly via right-click + WASD, sometimes with [shift] if I want it to move faster. Occasionally, instead of moving my camera, it alters the draw distance / FOV / some visual aspect ...
10
votes
2answers
589 views
Why is 90° horz / 60° vert the default FPS Field of View?
As far as I understand it, vertical Field of View should be adjusted to:
fov = 2 * arctan(0.5*screenHeight / distanceEyeScreen);
That is, Field of View should match a user's distance to and size of ...
0
votes
0answers
48 views
Top down 2D camera in relation to keyboard commands
I have a basic 2D camera:
transform =
Matrix.CreateTranslation(-position.X, -position.Y, 0) *
Matrix.CreateRotationZ(-rotation) *
Matrix.CreateScale(new Vector3(zoom, zoom, 1)) *
...
1
vote
1answer
74 views
Optimize maximum performance “Frustum.contain ()” on XNA?
I wonder if it is possible to optimize the performance of "BoundingFrustum" requesting return of the visible elements that are found only on the part of the ground before the player .. Checker and not ...
0
votes
1answer
57 views
Putting a 2d camera into a gamestatemanagement sample [closed]
Hello everyone i am new to xna and i am trying to implement a simple 2d camera that follows my sprite around the level i am using a gamestatemanagement so i have the basic platformer with screen ...
1
vote
1answer
375 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.
...
-5
votes
1answer
91 views
camera2d class will not work [closed]
using System;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using ...
0
votes
3answers
243 views
How do I create a 3rd person camera?
I currently have a camera class set up and have my model/player loaded but I can't get my camera in the correct position by changing the x,y,z coordinates.
I have set up my "game" with a separate ...
0
votes
1answer
168 views
perspective camera with libgdx
I am trying to setup a viewport using perspective camera. I am trying to render a scene like this
I read an official blog post about the cameras and found a few tests within gdx test suits. ...
2
votes
1answer
88 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",
...
0
votes
1answer
71 views
Camera in Flash
Im having a hard time trying to work out how to implement a smooth camera in flash.
In something like openGL i would use a transformation matrix to move the camera around the scene.
However with ...
2
votes
1answer
223 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
2answers
205 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 ...
1
vote
3answers
692 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 ...
0
votes
1answer
55 views
A view and projection matrix oddity?
I have a bit of a dilemma ...
So i setup my scene how I want it with some bits in it and now I want to move all my camera related code in to a camera class however doing so is proving to be a pain in ...
3
votes
2answers
775 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 ...
1
vote
1answer
166 views
Tiled map seen from an angle
I have working code to display a tiled map. It's composed of a OrthogonalTiledMapRenderer and an OrthoGraphicCamera :
camera.setToOrtho(false, WORLD_WINDOW_SIZE.x,
WORLD_WINDOW_SIZE.y);
...
4
votes
4answers
478 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 ...
1
vote
2answers
108 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 ...
0
votes
1answer
123 views
How do I create a camera for a strategy game?
How do I make a camera for a strategy game? Think something in the style of Warcraft 3, so you can lower the camera angel and view the world in a somewhat 3D format. Do I need to have some coordinate ...
-1
votes
1answer
150 views
Camera not working
I made a camera in DX9. To move forward I press the Up arrow. To rotate on the Y axis I use the mouse. When I perform these movements on their own the camera moves at the speed I want.
However, if I ...
2
votes
1answer
112 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 ...
0
votes
1answer
209 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 ...
3
votes
1answer
118 views
Camera Math for Directions
I have a Camera object that has the variables:
class Camera : Object
{
public:
float positionX, positionY, positionZ;
float directionX, directionY, directionZ;
int speed;
...
2
votes
1answer
154 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 / ...
5
votes
2answers
158 views
Calculate new coords of camera after a 90 degree rotation in an isometric 2D projection
I made a 2D isometric renderer. It works fine but now I want to show my scene from 4 different points of view (NE NW SE SW) but, on a 90° rotation, my camera cannot keep the center of my scene on ...



