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
votes
1answer
113 views

Homeworld style orbital camera concept [closed]

So I spent some time thinking of how I'm going to make a camera similar to what's used in Homeworld (a 3D space RTS, in which your camera can be rotated around your units to look at them from any ...
0
votes
1answer
439 views

How to get plane rotation by known normal vector

I have a FPP quaternion Camera and Plane with known normal vector. I want to find the orientation of this Plane so I can replace it to the Camera orientation to put the camera forward vector to a ...
1
vote
1answer
51 views

Why does my camera break mouse position targeting? [duplicate]

I made a short video of this. Basically, when the screen scrolls with the camera, the character begins firing at the incorrect mouse position. You can see where I am clicking the whole time. As we ...
1
vote
1answer
174 views

How do I ensure that my 2D side-scroller camera stays within the world bounds?

I have tried implementing a basic 2D sidescroller camera in XNA, but I don't want it to be able to scroll past the edges of my tile map! I tried to fix it, but when I get the left side working, the ...
0
votes
1answer
706 views

How to clamp player movement correctly?

I have a 2D space shooter game. I looked up some questions from unity community and came across this solution. Below is the code for my player's movement: //horizontal <- || -horizontal -> ...
0
votes
1answer
161 views

What are the correct angles in the Top-down perspective?

In the following picture it says that in the Top-down perspective the angles are 90°, but if it would be 90° then you shouldn't see the front of the building and the roof at the same time... So what ...
0
votes
1answer
93 views

Is there a benefit to applying forces to my camera?

I have implemented a camera system and a rudimentary physics system. I now have a decision to make regarding steering the camera: Option 1 - Update the camera movement directly. eg. position (0, 0, ...
-1
votes
2answers
94 views

Camera movement bug

In my game, the player's movement script and the camera's movement script are separate. Both of them use "W", "A", "S", and "D" to move. The camera can also use "Q" and "E" to rotate around the ...
0
votes
1answer
618 views

How do I move the camera in 2D LWJGL openGL?

I am making a top-down rpg game with the LWJGL but I can't figure out how to make the camera follow the player. I've tryed using GLU.gluLookAt() but it seems to be designed for 3D and when I try it ...
0
votes
1answer
198 views

moving first person camera with the mouse on right click

I am new to game development and I am trying to get the game input working. I have successfully got all the movement keys for walking/running/looking around working; however, I am having a terrible ...
1
vote
1answer
145 views

Draw character silhouette when not visible

I have a mesh representing my character. I want to give it a partially transparent greyish silhouette when other objects are blocking it from view of the camera. I'm using Ogre3D, and GLSL as a ...
0
votes
0answers
187 views

Bullet Physics Raytrace Picking

I'm having trouble picking using bullet's raytrace code Here's what I have so far for creating the actual Ray float top = 1.f; float bottom = -1.f; float nearPlane = 1.f; float tanFov = (top - ...
1
vote
1answer
71 views

Why does everything appear backwards when using orthographic projection?

I may not be calculating my orthographic projection matrix properly. What can I do to ensure that my scene renders correctly when using orthographic projection? The rendering order appears to be ...
1
vote
1answer
55 views

Camera Aligned To Sphere Surface

I am writing a planet renderer and have come across a problem that is really limiting the usability of the program. When I am on the planet (anywhere but the north pole) I cannot rotate the camera to ...
-1
votes
1answer
129 views

Live capturing from Unity-like application

I need such thing for non-game application: A city-like 3D scene, containing a few people. People walk, run, stand, ... May be cars also. Around the scene some cameras are located. And I need them ...
1
vote
1answer
65 views

How are scripted camera usually managed?

I noticed that many open games (think platformers, adventure, action...) have very complex cameras that appear to mix both automatic placement most of the time, and sort of pre-placed camera ...
0
votes
1answer
334 views

XNA 2D Camera, zoom into player

My 2D camera follows the character fine without any zooming. However, when I tried adding a zoom feature using the Matrix.CreateScale(), the camera no longer follows the character properly. public ...
-1
votes
2answers
132 views

What Should the Limits On the Camera's Pitch Be? [closed]

What should I be using as the limit to how much a camera can pitch in a first person video game? I'm assuming most video games use around the same value - so if I can use that value in my game, it ...
3
votes
3answers
164 views

Smooth interpolation with variable time steps

My game engine just went through a small overhaul that changed its fixed time step loops into variable time steps ones. Though everything has already been adapted steadily to the new environment, ...
0
votes
1answer
756 views

My method for switching between cameras in Unity does not change the main camera

I would like to be able to switch between a variable number of cameras in my scene. The common approach requires toggling the active camera's 'enabled' property to true and setting the others to ...
0
votes
0answers
159 views

LWJGL Translation Problems with Matrix4f Class

I've just implemented a simple 3D Camera into my current game program using matrices and shaders. (I've basically just implemented the simple camera found here: ...
0
votes
1answer
441 views

LWJGL Camera Rotation Issues

I am quite new to LWJGL and OpenGL and I am trying to create an FPS camera. I had no problem with 2D stuff, so I decided to step things up and try and make some things in 3D. I have this 3D camera ...
-3
votes
1answer
114 views

GLSL does weird things to my view matrix [closed]

uniform mat4 model; uniform mat4 view; varying vec4 vColor; void main(){ gl_TexCoord[0] = gl_MultiTexCoord0; gl_Position = view * model * gl_Vertex; vColor = gl_Color; if(view * ...
0
votes
0answers
38 views

Matrix transforms with SpriteBatch overloading - how do you rotate/zoom around a point? [duplicate]

I have a transform matrix which works as intended for game objects I want to be completely controlled by my camera: _transform = Matrix.Identity * Matrix.CreateTranslation(-_position.X, ...
1
vote
0answers
38 views

Cinematographic camera manipulation techniques for a 2D adventure game [closed]

I'm coding a subsystem to manipulate camera for our 2D adventure game. I plan to support panning and zooming. Also, perhaps, rotation (but current scenario does not call for that). We also support ...
1
vote
1answer
425 views

What is difference between AndEngine's three Cameras

I am new to game development. After observing some AndEngine code snippets, I am trying to figure out which camera would be best suitable for my 2D game. Either it's BoundCamera, SmoothCamera or ...
0
votes
0answers
155 views

Processing - implement a first person camera?

First off, I'm sorry if there are duplicates of this. I did an extensive Google search but was unable to find anything that made sense to me. (I am new to 3D rendering and such.) I want to make a ...
0
votes
2answers
202 views

Keep Mini map static after rotating / zooming with camera

Hi I am making a 2D game, where the Camera is able to rotate / zoom in or out on the camera focus (the player usually). However my game also contains a mini-map, and so far whenever I have to rotate ...
4
votes
1answer
455 views

How do I ensure that perspective and orthographic projection matricies show objects at the same size on the screen?

I am working on a 3d scene editor and would like to show the scene in orthographic projection. My current problem is that I am not sure how to calculate the orthographic projection matrix such that ...
2
votes
1answer
273 views

LibGDX strange camera behaviour

I'm currently doing my final assessment for my study Game Development. I'm currently facing a real weird (maybe explainable) result from my camera. I just set up my scene with alot of tiles and a ...
-1
votes
2answers
158 views

Using Geometric Slerp to move Camera

I'm writing a program in C++ using OpenGL and GLM; I'm trying to get my camera to follow my car. So far it successfully follows it around the screen, but I'm having trouble adjusting the Camera's ...
1
vote
3answers
127 views

Applying scale to objects appears to have little effect when close up.

I just started out with D3D 11. My goal is to write a cube voxel engine (Minecraft style). Actually it's working pretty solid already, but when I finally tried to change the size of my cubes, I ran ...
1
vote
1answer
194 views

Camera movement and threshold not working

I have a platformer that is in progress, part of this has a camera which I only want to move when the character moves out of a certain threshold, to try to accomplish this I have the following if ...
2
votes
1answer
427 views

How to crop camera's viewport?

I'm making an Android game using LibGDX. I want to do something hard to explain but I'll try nonetheless. Look at this camera view (it's from 3ds max): I can get same exact view in LibGDX without ...
2
votes
1answer
283 views

Rotate Camera as an Object Manoeuvres

There are loads of questions (all of which I have looked at) on here about cameras following objects. Using them, I have successfully got my camera to follow my car when driving, but I am unable to ...
0
votes
1answer
125 views

How can I get my Android camera system working more like Google Earth's? [duplicate]

I'm implementing a touch screen interface whereby the user dragging their finger on the screen will rotate the camera in a sphere around the central point. My code works well for the horizontal swipe ...
0
votes
2answers
228 views

How to detect collision between a camera and a mesh?

I am wondering how you would be able to extract mesh properties (i.e. faces, vertices, and vertex normals) and use them to create a collidable object, one that a camera can't go through ? I am using ...
0
votes
1answer
600 views

How can I have my third-person camera track slightly ahead of the player as he or she moves?

I have a 3rd person camera controller in a top-down game. I have my cameran following the player and I currently use linear interpolation to make the movement smooth and a little laggy. But I would ...
0
votes
1answer
201 views

LWJGL: Camera distance from image plane?

Let me paste some code before I ask the question... public static void createWindow(int[] args) { try { Display.setFullscreen(false); DisplayMode d[] = ...
4
votes
2answers
2k views

Camera chasing player

I want the camera to follow the player and lag a little bit and then catch up with the player when the player halts. When stopped the player is in the center. At the moment im at the point where i ...
1
vote
1answer
162 views

Augmented reality on Mobile platform - iOS

Is there a way that we can control the iOS device camera to an extent what colors it sees, what shapes it sees ? etc I'm speaking about the ability to read information before the image is captured. ...
0
votes
1answer
258 views

How to stop camera from rotating in 2.5d platformer

I'm stuck with a problem: I can not make my camera stop rotating after character. What I already have tried: using empty game object with rigid body and locked rotation and make it parent of camera, ...
2
votes
1answer
315 views

Project collision shapes to plane for 2.5D collision detection

I am working on a top down 2.5D game. In the game anything that overlaps on the screen should be 'colliding' with each other regardless of whether they are on the same plane in the 3D world. This is ...
0
votes
1answer
924 views

Quaternion LookAt for camera

I am using the following code to rotate entities to look at points. glm::vec3 forwardVector = glm::normalize(point - position); float dot = glm::dot(glm::vec3(0.0f, 0.0f, 1.0f), forwardVector); ...
2
votes
0answers
828 views

Arcball 3D camera

I have checked multiple threads before posting, but i havent been able to figure this one out. Ok so i have been following this tutorial, but im not using glm, ive been implementing everything up ...
0
votes
3answers
222 views

OpenGL camera moves faster than player

I have a side scroller game made in OpenGL, and I'm trying to center the player in the viewport when he moves. I know how to do it: cameraX = Width / 2 / TileSize - playerPosX cameraY = Height / 2 / ...
1
vote
0answers
392 views

Cocos2d-x CCFollow Zooming issue

Hi I am currently building a cocos2d-x game which incorporates pinch zoom using CCLayerPanZoom class which can be found here The problem is basically when using CCFollow and zooming and out, it ...
5
votes
2answers
647 views

Rotating object around moving object/player in 2D

I am trying to implement a camera which rotates around the world around the player. I have found many solutions online to the task of rotating an object about the origin, or about an arbitrary point. ...
1
vote
1answer
817 views

How to automatically render all opaque meshes with a specific shader?

I have a specular outline shader that I want to be used on all opaque meshes of the scene whenever a specific camera renders. The shader is working properly when it is manually applied to some ...
2
votes
1answer
187 views

First Person Camera strafing at angle

I have a simple camera class working in directx 11 allowing moving forward and rotating left and right. I'm trying to implement strafing into it but having some problems. The strafing works when ...