# Tagged Questions

38 views

### Computing Field-of-View from window dimensions

I'm looking into computing the vertical Field-of-View (FOVy) based on the projection parameters of my camera. From this source, I've found an equation that seems to work. float ...
90 views

### How to implement camera pan like in Maya?

I am trying to implement camera pan like the one in Maya. I've got it almost working. The problem is that the mouse cursor is moving faster than the 3d mesh (in fact I am moving the camera but I ...
92 views

### How do I find the camera direction vector for 3D sound purposes? (C++, DirectX)

Question I'm trying to make a sound class for playing 3D sound effects with DirectSound and DirectX, without using DirectSound's 3D libraries. The plan is to have every game object constantly play ...
84 views

### Camera rotation around point, but without centering

Let's say i have the following: Point somewhere in space Camera with position and orientation (up, right, forward) I want to rotate camera around the point, but also keep this point in same place ...
51 views

### Focus a turntable style camera on an object

I have a turntable style camera in the maya / blender / alembic / opensubdiv example. I want to be able to match the camera translation to any objects translation pivot point in the scene and then ...
185 views

### How do I fix my planet-facing camera?

Summary I'm having trouble implementing a camera controller suitable for first person use around a planet. The camera needs to be oriented correctly according to gravity (vector from camera ...
305 views

### How do I determine the look-at vector of a free-look camera?

I'm trying to create a free-look camera with DirectX 10. I've figured out how to get the directions for forward and back and left to right. However, I don't know how to rotate the look-at vector of ...
326 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 ...
166 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 - ...
147 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 ...
246 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 ...
740 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 ...
377 views

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 ...
590 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. ...
172 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 ...
182 views

### OpenGL camera translate and rotate on cameras local axis

How can I make rotation and translation on a local camera axis in OpenGL? I want to make camera like "aeroplane" camera with a pitch yaw and roll. I want to have good explanation on everything! Can ...
468 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 ...
978 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 ...
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. ...
249 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 ...
191 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; ...
2k views

### Implementing a camera / viewport to a 2D game

What is the most practical way to implement camera/viewport to a 2D-game? I've read, that I should store the object world position instead of position relative to the screen? Current situation: I ...
259 views

### 3D Camera manager tool – is there any?

Are there some libraries or example codes, of a camera manager – a tool, that would move camera using some smooth lines (bsplines or similar)? So basically I request an animation to move to a new ...
2k views

### How to rotate camera centered around the camera's position?

Currently I am using gluLook at like so: gluLookAt(position.x, position.y, position.z, viewPoint.x, viewPoint.y, viewPoint.z, upVector.x, upVector.y, upVector.z); with the ...
185 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 ...
2k views

### Panning with the OpenGL Camera / View Matrix

I'm gonna try this again I've been trying to setup a simple camera class with OpenGL but I'm completely lost and I've made zero progress creating anything useful. I'm using modern OpenGL and the glm ...
549 views

### Issues implementing arcball viewer

My scene has a simple cube, and a camera built with the lookAt function (I'm using OpenGL). The scene renders fine, and I'm sure I have my model/view/projection matrices set up correctly. Now I'm ...
1k 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 ...
389 views

### Camera rotation not working right?

I'm new to game programming but I've read a lot of tutorials. I was just trying to make my own camera class but instead of the scene rotating around the camera, the camera stays stationary while ...
806 views

### Camera Rotation (for mouse look) with LookAt does not work as expected (Local/Global)

My code for rotating my 3D fps camera isn't working as expected. I expect that the X-axis does rotate with the Y-axis, but it ain't so. I made some pictures to explain it better, I think its doing ...
5k 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 ...