The viewpoint from which the game world is observed from.
2
votes
0answers
136 views
Camera - View matrix in Android + openGLES 2
I am trying to use the touch screen on the tablet to control my camera movements and generate the view matrix accordingly.
I get the x and y coordinates of the screen and after doing some sanity ...
10
votes
1answer
291 views
How do I create multiple 2D spotlights?
I'm looking to create a 2D "spotlight" effect that allows a spotlight on multiple entities. I.e., as if several sprites were holding torches. For a single entity (one spotlight), I use a technique ...
0
votes
0answers
65 views
Returning incorrect camera position (0, 0, 0) [closed]
So I've been trying to do picking code, but I've run across an issue before I even get started. I have a pointer that is rendered as a cube at the camera's position + 10 on the z axis, but when I run ...
4
votes
1answer
471 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 ...
0
votes
1answer
746 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
144 views
Camera movement using WASD on x/z plane only
I've been wearing my enter key down on google searches - I have a camera script based on the MouseOrbit.js asset. That's all working fine, but in addition to the basic orbiting and the zooming that ...
1
vote
1answer
65 views
Dealing with field of view when zooming into a terrain from a height
I'm creating a tech demo featuring a small planet. The problem I'm having is that the planet doesn't really feel like the right "scale" when the camera in down on the surface, I think it could be the ...
0
votes
1answer
127 views
Use of FlxG.camera.follow to follow a character vertically
I am developing a prototype for a game in Flixel in which a character floats upward continually to traverse the level. I would like to have a "tall" layout for levels and set the FlxG.camera to follow ...
1
vote
1answer
297 views
OpenGL ModelView matrix
Hello I am trying to understand matrix operations behind OpenGL and I have some questions.
1- When we first create a simple window using glut and opengl, we use such a command below to draw a simple ...
1
vote
0answers
31 views
resizing directx control so that more of my object's environment is visible
I'm very new in 3D. I have a DirectX control which I want to be able to resize. A 3D object is shown in the control. On resize, I would like that object to stay the same size, only more of its ...
6
votes
5answers
678 views
FPS games: don't they have unrealistic one-eyed view? What are the causes?
I have played many fps games, and noticed that the camera perspective is similar to the 'one eyed view' of the surroundings. It does not feel like bilinear. :/
Is it because of the single flat view ...
11
votes
3answers
3k views
How do I implement a quaternion based camera?
UPDATE The error here was a pretty simple one. I have missed a radian to degrees conversion. No need to read the whole thing if you have some other problem.
I looked at several tutorials about this ...
27
votes
5answers
3k views
Realistic Camera/Screen Shake from Explosion
I'd like to shake the camera around a bit during an explosion, and I've tried a few different functions for rocking it around, and nothing seems to really give that 'wow, what a bang!' type feeling ...
5
votes
1answer
165 views
Swaying Camera when Walking
You can see the effect in many games. The camera sways or wiggles a bit while walking to make the movement feel more realistic.
I have implemented a camera in my game. (Who'd have thunk it?) So is ...
1
vote
1answer
225 views
XNA - moving the 3rd person camera
I'm having following problem:
Can't set my camera to follow object from behind and rotate when I use left/right arrow. I've tried different tutorial and examples but it still doesn't work for me. ...
2
votes
1answer
117 views
Difference between rotation methods?
My question is in about rotate methods in android.graphics.Camera. In Docs, I saw these comments:
public void rotateX (float deg) Since: API Level 1
Applies a rotation
transform around the X ...
2
votes
2answers
214 views
How does Wii detect user's movement with its camera?
I try to understand the concept behind Wii device. It has 4 camera with capture user's movement, I wonder how does these cameras work? Any reference, article, or papers would be great source for me to ...
1
vote
1answer
176 views
How do I make camera follow the player within some bounds?
I am creating a simple ambient/explorer platformer. Because I want the player to only be able to see a new area once they have reached it, I decided to split up the world in rooms.
To not make things ...
5
votes
2answers
458 views
Manipulating a free camera
I have a camera class in my code which stores two 4x4 matrices. One for the view matrix and one for the projection matrix. Originally, I had two floats in the class for pitch and yaw and these were ...
0
votes
1answer
274 views
XNA - move camera over tilemap
I am trying to build a game based on Advance Wars in XNA.
I am so far where the tiles are placed on the screen, except here starts my problem. During the game, I ofcourse want to move the camera ...
1
vote
1answer
933 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
votes
1answer
96 views
OpenGL glMatrixMode rotation
I'm stuck on trying to figure out how to rotate the viewport(or camera). So far I've figured out I need to use the function glRotatef and glMatrixMode(GL_MODELVIEW). But I have no idea how to apply ...
4
votes
1answer
230 views
How do I calculate the boundary of the game window after transforming the view?
My Camera class handles zoom, rotation, and of course panning. It's invoked through SpriteBatch.Begin, like so many other XNA 2D camera classes. It calculates the view Matrix like so:
public Matrix ...
3
votes
1answer
131 views
Blender Object Appearing Gray when all Lights are Off
I have an issue with Blender where, when I turn my only light off (a sun lamp) and render the image my object appears gray rather than black (and thus, not appear to the camera). I can't figure out ...
5
votes
3answers
1k views
XNA 4.0: 2D Camera Y and X are going in wrong direction
I asked this question on stackoverflow but assumed this might be a better area to ask it as well for a more informed answer.
My problem is that I am trying to create a camera class and have it so ...
0
votes
0answers
267 views
libGDX using Stage and Actor produces different camera angles on desktop and Android Phone
libGDX using Stage and Actor produces different camera angles on desktop and Android Phone.
Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq
On the desktop ...
0
votes
0answers
90 views
Camera Projection back Into 3D world, offset error
I'm using XNA to simulate a robot in a 3D world and then do image analysis on what the camera sees.
I have my camera looking down in front of the direction that the robot is going, and I have the ...
4
votes
1answer
133 views
Why does CameraZ=0 result in no render?
I am trying to draw simple model, but I am experiencing strange error. When I use this View matrix:
Matrix.CreateLookAt(new Vector3(0, 200, 1), new Vector3(0, 0, 0), Vector3.Up);
my model is drawn ...
3
votes
1answer
1k views
How can I track a falling ball with a camera?
I have been trying to get my camera to follow a falling ball but with no success.
here is the code
float cameraY = (FrustumHeight / 2)+((ball.getPosition().y) /2) - (FrustumHeight /2);
...
0
votes
2answers
311 views
Making a Camera look at a target Vector
I have a camera that works as long as its stationary. Now I'm trying to create a child class of that camera class that will look at its target.
The new addition to the class is a method called ...
-1
votes
1answer
184 views
How to create GoogleMaps-like camera for simple 2D strategy game? [closed]
I am just starting in game development (with web programming background).
I want to know how to create 2D game with camera that can zoom in/out and can be moved like map in Google Maps.
Could you help ...
1
vote
1answer
73 views
XNA 3D coordinates seem off
I'm going through a book, and the example it gave me seems like is should work, but when I try and implement it, it falls short.
My Camera class takes three vectors in to generate View and Projection ...
0
votes
2answers
144 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 ...
12
votes
1answer
198 views
Orthographic unit translation mismatch on grid (e.g. 64 pixels translates incorrectly)
I am looking for some insight into a small problem with unit translations on a grid.
Update and Solved
I solved my own issue. See below for details. Everything in this part of the post turned out to ...
1
vote
0answers
169 views
Drawing two orthogonal strings in 3d space in Android Canvas?
I want to draw two strings in canvas. The first string must be rotated around the Y axis, for example 45 degrees. The second string must start at the end of the first string and also it must be ...
2
votes
1answer
196 views
C# 2D Camera Max Zoom
I have a simple ship sprite moving around the screen along with a 2D Camera.
I have zooming in and out working, however when I zoom out it goes past the world bounds and has the cornflower blue ...
1
vote
3answers
834 views
How to add a scrolling camera to a 2D Java game?
I am attempting to create a game where the camera follows the player, always making sure the player is in the center of the screen. How would I go about this? This game is a 2D Java game, made with no ...
0
votes
0answers
228 views
Making a Background Scrolling in Stacking Game
Hmmm...Is it a good idea to use a LibGDX parallax background for making a stacking game (i.e. PAPA STACKer Lite)? For example, I'm starting to use the blocks to drag-n-drop it. Next, when the next ...
1
vote
0answers
142 views
How do I convert my matrix from OpenGL to Marmalade?
I am using a third party rendering API, Marmalade, on top of OpenGL code and I cannot get my matrices correct. One of the API's authors states this:
We're right handed by default, and we treat y ...
3
votes
2answers
430 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 ...
0
votes
0answers
120 views
Keep 3d model facing the camera at all angles
I'm trying to keep a 3d plane facing the camera at all angles but while i have some success with this:
Vector3 gunToCam = cam.cameraPosition - getWorld.Translation;
Vector3 beamRight = ...
2
votes
4answers
207 views
Moving camera, or camera with discrete “screens”?
I'm making a game with a friend, but having trouble deciding on a camera style.
The basic idea for the game, is having a randomly generated 2-dimensional world, with settlements in it. These ...
0
votes
1answer
1k views
How to add isometric (rts-alike) perspective and scolling in unity?
I want to develop some RTS/simulation game. Therefore I need a camera perspective like one knows it from Anno 1602 - 1404, as well as the camera scrolling.
I think this is called isometric perspective ...
1
vote
1answer
161 views
Fixed texture size (Pixel) libgdx, java
If I resize the window (e.g. fullscreen) the texture size also changes!
I want that behaviour: If I change to fullscreen you will see more of the game world. The size (Pixel) of the texture stay the ...
3
votes
1answer
261 views
Panning a 3d viewport in 2d direction with rotated camera
I am using below code to pan the viewport (action script 3 code using flare3d framework)
_mainCamera.x-= Input3D.mouseXSpeed;
_mainCamera.z+= Input3D.mouseYSpeed;
Where as Input3D.mouse[X|Y]Speed ...
0
votes
1answer
322 views
Why does my 3D model not translate the way I expect? [closed]
In my first image, my model displays correctly:
But when I move the model's position along the Z-axis (forward) I get this, yet the Y-axis doesnt change. An if I keep going, the model disappears ...
2
votes
1answer
90 views
Camera closes in on the fixed point
I've been trying to create a camera that is controlled by the mouse and rotates around a fixed point (read (0, 0, 0)), both vertical and horizontal. This is what I've come up with:
camera.Eye = ...
1
vote
1answer
532 views
2d game view camera zoom, rotation & offset using 'Filter' / 'Shader' processing?
I wish to add the ability to zoom-in, zoom-out, rotate and move the view in a top-down view over a collection of points and lines in a large 2d map. I split the map into a grid so I only need to ...
1
vote
0answers
169 views
Camera not staying behind model while moving in circle
I have a camera behind a model (3rd Person) and I'm having problems KEEPING it behind the model. When I first start my game, you see the back of the model. If the model moves forward, backward or ...
0
votes
1answer
153 views
Limit the amount a camera can pitch
I'm having problems trying to limit the range my camera can pitch. Currently my camera can pitch around a model without restriction, but having a hard time trying to find the value of the ...

