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
0answers
89 views

Determining axis to rotate around

I'm trying to implement a free-look third person camera (using glm). I know that the general transformation is newCameraPosition = translate(lookatPoint) * rotation(angle,axis) * ...
0
votes
1answer
185 views

First person shooter camera movement

I am making an FPS in XNA. I cannot seem to make a FPS camera that I can move Forward, Back, Side to Side using the keyboard. How do I do that?
0
votes
2answers
449 views

First person camera: problem

I have created a simple camera class, moved it from my C# (XNA) source to C++ for d3d. Commonly it is okay, but something is wrong with rotation. If i increase its pitch/yaw values, according to ...
1
vote
1answer
442 views

Understanding the z-axis vector from OpenGL modelview matrix

I would like to shoot spheres in the current view direction in a simple scene. I use an FPS camera, so no z-rotation. The vector pointing in the correct direction should be (m[8], m[9], m[10]) where m ...
2
votes
2answers
219 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?
3
votes
1answer
726 views

Second camera record and export to video file (Unity)

I'm making horror quest game for PC on Unity. I'm trying my best to make it kind of unique and trying not to use standard methods like screamers etc. What i want to do badly is camera recording ...
-1
votes
1answer
180 views

Pinhole matrix problem

I made a program to represent a 3D world. I use the projection matrix we can find on wikipedia. For viewing a scene it's very nice but when I straff in the scene, everything behind the camera go on ...
10
votes
2answers
3k views

XNA 2d Camera Scrolling - why use matrix transform?

I am making a test game where I want the level to be constantly scrolling. To create this effect I have established a camera class which simply stores a vector2 position and an enum direction. It also ...
4
votes
1answer
159 views

Is there a way to write a camera class without matrix-transformation?

I have a problem with a camera class I got from the internet. It does a transformation like this: public Matrix get_transformation(GraphicsDevice graphicsDevice) { _transform = ...
0
votes
2answers
370 views

How do I implement a 2D camera in JPanel?

I'm trying to create a mario-esque game in Java and am at the point of implementing a camera. Following normalocity's example, I understand the difference between the GameWorld and the Camera that ...
0
votes
1answer
616 views

Camera Matrix Transform to scroll through level - Monogame, XNA

I am trying to change the way I scroll through a level. Currently I have a static camera class which stores a direction enum and a vector 2 position. This class then has a method to move the position ...
0
votes
2answers
88 views

Need transform matrix to translate the center of the view to a custom position within the target texture

My problem is as follows: I want to use a single render target texture for drawing 16 viewports where I want to display the 16 different combinations of the marching squares algorithm with my 3D ...
1
vote
3answers
65 views

2D Camera doesn't work when I have split my code into DrawableComponents

I have the following camera written: public class Camera { public Vector2 Position; Viewport Viewport; public Matrix Transformation { get { return ...
6
votes
1answer
171 views

How to prevent clipping when moving through a tunnel?

I'm developing for Android using OpenGL ES 2.0. It's going to be a game where you have to fly through a tunnel without hitting the walls. However, the tunnel wall gets clipped as the player ...
1
vote
1answer
335 views

Quaternions, Axis Angles and Rotation Matrices. Which of these should I use for FP Camera?

After 2 weeks of reading many math formulas and such I know what is a Quaternion, an Axis Angles and Matrices. I have made my own math libary (Java) to use on my game (LWJGL). But I'm really confused ...
1
vote
1answer
899 views

How to set orthgraphic matrix for a 2d camera with zooming?

I'm using ID3DXSprite to draw my sprites and haven't set any kind of camera projection matrix. How to setup an orthographic projection matrix for camera in DirectX which it would be able to support ...
1
vote
2answers
327 views

Creating a 2D perspective in 3D game

I'm new to XNA and 3D game development in general. I'm creating a puzzle game kind of similar to tetris, built with blocks. I decided to build the game in 3D since I can do some cool animations and ...
2
votes
1answer
720 views

Problem using glm::lookat

I am trying to rotate a sprite so it is always facing a 3D camera. Object GLfloat vertexData[] = { // X Y Z U V 0.0f, 0.8f, 0.0f, 0.5f, 1.0f, -0.8f,-0.8f, 0.0f, ...
2
votes
1answer
257 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 ...
0
votes
0answers
76 views

Lwjgl camera causing movement to be mirrored

I'm having a problem in that everything is rendered and the movement is fine. However, everything seems to be mirrored. In the sense that the TriangleMob should move towards me, but it doesn't instead ...
0
votes
1answer
78 views

XNA Rendering vertices that only appear within the cameras view

I'm making a game in XNA and I recall hearing that professionally made games use a technique to only render the polygons that appear within the cameras projection. I've been trying to find something ...
1
vote
2answers
243 views

What should I consider when selecting a field-of-view (FOV) for a space game?

I am making a space game (like the game Freelancer). You control a space ship in third person. What are some gameplay considerations that I should weigh when selecting a field-of-view (FOV) for such ...
4
votes
2answers
2k views

Multiple viewpoints in Unity3D?

I'm working on a 3D game in Unity. The primary view is a top-down view, but I am also looking to do target profiles that are true animated versions that reflect the actions of the target. The ...
3
votes
1answer
111 views

Vertices shaking with large camera position values

Basicly when i set the position of my camera (my character in game) to a high value, the geometries seems to be shaking, the higher the position value, the more they shake. On low position values you ...
0
votes
1answer
101 views

3D drawing precision problem. XNA

I have a simple scrolling camera positioned 2000 units about the 3D 'floor' that moves forward by 1 unit every frame and looks down on the floor at a point that also moves forward by 1 unit every ...
1
vote
1answer
213 views

Creating big scene and little size chasing camera

I would like to create a climb based game, so I need to have a big scene and a camera that cover only a little part of it and chase my player. This image explains easier what I want: How can I do ...
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) : ...
-1
votes
1answer
398 views

Android OpenGLES 2 ray picking, resulting coordinate jumpy in certain spots?

I am trying to implement object picking based on touch coordinates via an intersecting ray test. I am having trouble finding information on converting the touch coordinates to the coordinate system ...
0
votes
1answer
320 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
85 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 ...
3
votes
2answers
203 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 ...
1
vote
3answers
227 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 ...
4
votes
2answers
946 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
1answer
119 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 ...
5
votes
2answers
225 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 ...
0
votes
2answers
117 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
1
vote
1answer
133 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 ...
6
votes
2answers
525 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 ...
0
votes
2answers
110 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 ...
0
votes
1answer
126 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 ...
3
votes
2answers
4k 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
1answer
382 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
320 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
442 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 ...
1
vote
2answers
821 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 ...
12
votes
2answers
2k 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 ...
1
vote
1answer
134 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 ...
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. ...
-5
votes
1answer
149 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 ...
12
votes
2answers
2k 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 ...