Tagged Questions

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

learn more… | top users | synonyms

-2
votes
1answer
732 views

Shaky Camera Effect 2D

The camera in my game engine can be modified by following a rectangle properties, that can be scaled, moved and even rotated. I need this effect for the shaking of the screen when a zombie attacks a ...
0
votes
1answer
274 views

Java Slick2d - Mouse picking how to take into account camera

When I move it it obviously changes the viewport so my mouse picking is off. My camera is just a float x and y and I use g.translate(-cam.cameraX+400, -cam.cameraY+300); to translate the graphics. I ...
1
vote
1answer
485 views

xna orbit camera troubles

I have a Model named cube to which I load in LoadContent(): cube = Content.Load<Model>("untitled");. In the Draw Method I call DrawModel: private void DrawModel(Model m, Matrix world) ...
0
votes
1answer
1k views

as3 3D camera lookat

I'm making a 3D camera scene in Flash, draw using drawTriangles() and rotated and translated using a Matrix3D. I've got the camera to look after a specific point, but only on the Y-axis, using the x ...
2
votes
1answer
549 views

Why use 3d matrix and camera in 2D world for 2d geometric figures?

I'm working in XNA on a 2d isometric world/game and I'm using DrawUserPrimitives to draw some geometric figures... I saw some tutorials about creating dynamic shadows but I didn't understood why they ...
-1
votes
1answer
187 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 ...
3
votes
1answer
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 ...
4
votes
1answer
572 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 ...
0
votes
3answers
227 views

Understanding how to go from a scene to what's actually rendered to screen in OpenGL?

I want something that explains step by step how, after setting up a simple scene I can go from that 'world' space, to what's finally rendered on my screen (ie, actually implement something). I need ...
3
votes
2answers
5k views

How To Smoothly Animate From One Camera Position To Another

The Question is basically self explanatory. I have a scene with many cameras and I'd like to smoothly switch from one to another. I am not looking for a cross fade effect but more to a camera moving ...
4
votes
2answers
2k views

Viewport / Camera Calculation in 2D Game

we have a 2D game with some sprites and tiles and some kind of camera/viewport, that "moves" around the scene. so far so good, if we wouldn't had some special behaviour for your camera/viewport ...
7
votes
3answers
2k views

How to keep my Quaternion-using FPS camera from tilting and messing up?

I am using an FPS-like camera, and it uses quaternions. But, whenever I try looking up and then sideways, it tilts, and sometimes it can turn upside down. How can I fix this?
3
votes
1answer
608 views

3D zooming technique to maintain the relative position of an object on screen

Is it possible to zoom to a certain point on screen by modifying the field of view and rotating the view of the camera as to keep that point/object in the same place on screen while zooming ? Changing ...
4
votes
2answers
3k views

Calculating up-vector to avoid gimbal lock using euler angles

I wish to orbit a camera around a sphere, yet the problem is that when the camera rotates so that it is at the north pole (and pointing down) or the south pole (and pointing up) of the sphere the ...
2
votes
2answers
239 views

Moving 2d camera in the y direction

I'm developing a simple game for the iphone and am struggling to work out the best way for the camera to follow the main character. The following picture hightlights the three main components: ...
3
votes
1answer
3k views

How do I create a bounding frustum from a view & projection matrix?

Given a left-handed Projection matrix, a left-handed View matrix, a ViewProj matrix of View * Projection - How do I create a bounding Frustum comprised of near, far, left, right and top, bottom ...
1
vote
2answers
426 views

Frustum Culling/Only rendering what's viewed by the Camera in HTML5 Canvas?

I coded up a simple 2D Camera for my HTML5 Canvas-Based Game Engine but I noticed the performance wasn't very good. So a lot of people suggested only rendering things that are shown by the camera but ...
4
votes
1answer
1k views

Orthographic Camera Zooming

In XNA I am using a spritebatch to render a board. I have created a camera class which can provide me a view and projection matrix. Currently I am supplying the view matrix to my sprite batch when I ...
2
votes
2answers
1k views

How to rotate an object so it stands correctly (back always facing the camera)

I have the following scene: And I have two 3D vectors, the camera position, and the focus position. The focus vector is always behind the monster. I know how to rotate the camera around the focus ...
3
votes
2answers
178 views

Camera placement sphere for an always fully visible object

Given an object: With the bounds [x, y, z, width, height, depth] And an orthographic projection [left, right, bottom, top, near, far] I want to determine the radius of a sphere which allows me to ...
3
votes
2answers
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 ...
-1
votes
1answer
481 views

First person camera is somehow “magically” expanding

I'm making a first-person game, and I've gotten the camera done (modified version of Lloyd Goodall's code), but whenever I scale an object, it doesn't appear bigger, but the speed of movement seems to ...
1
vote
0answers
754 views

How to turn a 3d camera (in HTML5 2D Canvas)

A few years back I started experimenting with 3d in canvas. Everything went pretty well untill I had to to turn the camera, I couldn't get it done. A few days back I just happened to stumble upon ...
3
votes
1answer
282 views

Smooth Camera Offsets

I am attempting to implement a sort of, smooth camera that has angle offsets from the player as they turn, creating a cinematic effect as well as visual feedback for when the player turns. Here is an ...
2
votes
2answers
1k views

XNA Camera 2D confusion

I have followed the tutorial at http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/ to implement my 2D camera and everything works just fine. However this leaves me confused. ...
6
votes
2answers
2k views

What would be a good game making engine supporting Vector images?

I want to create a simple platforming game, in which you are a square in a wonderful world. I would like this game to be able to be played in browsers. Basically I am searching for something similar ...
5
votes
2answers
3k views

Keeping the camera from going through walls in a first person game in Unity?

I'm using a modified version of the standard Unity First Person Controller. At the moment when I stand near walls, the camera clips through and lets me see through the wall. I know about camera ...
-1
votes
1answer
407 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 ...
2
votes
1answer
854 views

Light mask map and camera for static lights in XNA Platformer

Using the example for some basic light maps found here : http://blog.josack.com/2011/07/xna-2d-dynamic-lighting.html, I've managed to create a lightmap texture using individual lightmaps and display ...
1
vote
0answers
152 views

Issues with Spherical Coords and gluLookAt

I am currently developing a game set in a planet(A sphere), in which my camera mostly works though some issues arise from this method: ...
1
vote
1answer
163 views

Averaging Camera Position

I'm making a camera which tracks the player. I am using a basic algorithm to calculate a position for the camera relative to the player. Then I am taking an average of this over the last x number of ...
0
votes
1answer
234 views

World Location issues with camera and particle

I have a bit of a strange question, I am adapting the existing code base including the tile engine as per the book: XNA 4.0 Game Development by example by Kurt Jaegers, particularly the aspect that I ...
0
votes
1answer
823 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 ...
3
votes
1answer
3k views

How do I move the camera sideways in Libgdx?

I want to move the camera sideways (strafe). I had the following in mind, but it doesn't look like there are standard methods to achieve this in Libgdx. If I want to move the camera sideways by x, I ...
0
votes
2answers
1k 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 ...
2
votes
1answer
4k views

How do I properly implement zooming in my game?

I'm trying to implement a zoom feature but I have a problem. I am zooming in and out a camera with a pinch gesture, I update the camera each time in the render, but my sprites keep their original ...
4
votes
1answer
913 views

2D Camera Acceleration/Lag

I have a nice camera set up for my 2D xna game. Im wondering how I should make the camera have 'acceleration' or 'lag' so it smoothly follows the player, instead of 'exactly' like mine does now. Im ...
2
votes
1answer
324 views

Draw Bug 2D player Camera

EDIT *Along with the Palindromes helpful response, I found that my bug was because I was calculating the camera coordinates in terms of tiles instead of pixels which caused the irregular motion.* I ...
1
vote
0answers
663 views

Picking 3D object with Mouse when using Camera Zooming in XNA 4.0

I've tried to figure out how to do picking with the mouse, and things work great when zoomed in all the way with the camera (Third Person Camera). And it works perfectly when using First Person ...
0
votes
4answers
3k views

XNA spritebatch drawing to the centre of screen

I have bit of a silly problem. Is is possible to use SpriteBatch.Draw() method to draw to the centre of screen using coords from the beginning of window (So resolution 800x600 would use 400;300) ...
3
votes
1answer
2k views

Orbiting a specific point - Orbiting Camera

How would I create a camera that with the mouse, it allows you to orbit around a specifc position, with the camera always facing that point? I would also like it to be able to always be at a constant ...
4
votes
0answers
1k views

OpenGL ES 2.0 Camera advices and general thoughts for a 2D engine [closed]

I'm working on my first 2D OpenGL engine for iOs 5+ using GLKit (that's to say: OpenGL ES 2.0). While I am on a good path and a lot of things are implemented and nicely working, I'd like to share with ...
1
vote
3answers
2k views

3D XNA Tracking Camera

I'm trying to implement a camera that tracks a 3D model in my game. I've taken a look at this MSDN article on creating a 3rd person camera, as well as experimenting on my own; but I don't get the ...
15
votes
5answers
2k views

What's the best head-bob formula?

Given a point in space, a direction of travel, and a time since start, what's a convincing, non-sickening formula to simulate head bob? What's been successful in previous games? Has there been any ...
6
votes
1answer
770 views

What are some good methods of implementing RTS-style Box selection?

I'm scouting around for different methods of implementing a typical RTS box selection. This is for 3D game - so I'm looking for methods for finding units within selection box in 3D world. Here is a ...
1
vote
1answer
341 views

How to prevent 2D camera rotation if it would violate the bounds of the camera?

I'm working on a Camera class and I have a rectangle field named Bounds that determines the bounds of the camera. I have it working for zooming and moving the camera so that the camera cannot exit its ...
3
votes
1answer
333 views

Should the camera's rotation value be clamped?

I noticed that when writing a camera for my 2D game that the camera rotational value of -6 and 6 is equivalent to 0. That is, -6 = -12 = -18 = -24 = 6 = 12 = 18 = 24. I was wondering if it was ...
2
votes
1answer
312 views

delay camera xna

I read this tutorial http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Camera_delay.php but i didnot unsterstand it. Is there another way to delay the camera position movement without this ...
2
votes
0answers
1k views

AndEngine Making Chase Camera Follow Player

I am playing around with the AndEngine Race Game example. I am trying to make the camera follow the car as the player moves around. The Tile Map is larger than the player's screen but the camera ...
0
votes
1answer
227 views

How to move the camera in XNA only after few moments?

I made the camera position 10 units from an object, but not behind it. I dont want the camera position behind the object right away when it rotates, I want that when I will rotate the object, the ...