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

learn more… | top users | synonyms

0
votes
1answer
224 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[] = ...
-1
votes
0answers
8 views

Help Develop 3D Camera “LookAt” Method In JavaFX8 [duplicate]

[I know this question was supposedly answered, when asked by Grady 8 months ago (3D Camera Rotation), but I was unable to follow the solution, and I cannot get hold of Grady, so I am re-asking it with ...
0
votes
1answer
77 views

3D Translations relative to 3D Rotations

I'm trying to program camera movement to be relative to camera rotation. (Forward is always forward, regardless of pitch, yaw, and roll) I want to be able to move forward, backward, left, right, up, ...
1
vote
1answer
176 views

Libgdx 2D Game, Random generated World of random size, how to get mouse coordinates? [on hold]

I'm a noob and English is not my mothertongue, so please bear with me! I'm generating a map for a Sidescroller out of a 2D-array. That is, the array holds different values and I create blocks based ...
10
votes
2answers
11k views

How can I convert a mouse click to a ray?

I have a perspective projection. When the user clicks on the screen, I want to compute the ray between the near and far planes that projects from the mouse point, so I can do some ray intersection ...
0
votes
2answers
225 views

How do I efficiently determine what objects are visible to a camera?

I want to call the rendering methods of only the game objects that are visible. How can I efficiently determine which objects or tiles are within the camera's rendered region?
1
vote
2answers
86 views

Continuous world and camera problem

I have this problem where I split my big world into chunks and I don't know how to draw it into my game camera's view. Each world chunk has its own coordinate system, so when object reaches border of ...
2
votes
1answer
45 views

How to output to the Oculus and a 2D screen?

We'd like to present an Oculus game to a large group of people. Not everyone will have an Oculus headset, so we'd like to output to both the Oculus and a second display. The problem is that the ...
0
votes
1answer
23 views

Javascript 'camera' following object vertically without use of engine like Phaser or canvas [closed]

So I have to make a JS game for school (I'm an absolute novice when it comes to JS) in Adobe Edge without the use of a game engine. I've been attempting to make something like this game and so far ...
3
votes
1answer
82 views

How to set “near” value properly?

Usually, the camera's near value is set to sth like 0.1f. However, this (assuming 1.0f = 1 metre) makes everything that's closer than 10 cm from the camera invisible. On the other hand, when working ...
0
votes
1answer
25 views

Problematic cameraposition (Eye = (0,0,0), at=(0,-2,0) and up = (0,1,0))?

I am taking a course in computergraphics and we talk a lot about OpenGL and the math you need to do everything OpenGL does "by hand". A Question which was asked in an old exam (I am preparing at the ...
2
votes
1answer
155 views

Three.js camera turning leftside right

In Three.js I am trying to implement an orbiting camera can be rotated around the x and the y axis. I am using these two functions: function rotateX(rot) { var x = camera.position.x, ...
1
vote
1answer
211 views

Camera lookAt target changes when rotating parent node

have the following issue.I have a camera with lookAt method which works fine.I have a parent node to which I parent the camera.If I rotate the parent node while keeping the camera lookAt the target , ...
0
votes
1answer
90 views

Incomplete mesh using DrawIndexedPrimitives after rotating mesh

Through help on this site I was able to draw the triangles of an unrotated, nonscaled nontransformed mesh created in Blender and exported to OBJ, accurately imported through Assimp and rendered in XNA ...
1
vote
1answer
217 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 ...
6
votes
4answers
179 views

Keeping sprites nice and pixelated

How do I keep the sprites in my game nicely pixelated on screens of all sizes and resolutions? I use nearest-neighbor texture filtering when resizing pixels, but this works well only at really high ...
0
votes
1answer
307 views

Angled topdown perspective camera for 2.5d game

I have a 2d tile based game created using Unity's 2d tools and orthographic camera: The tiles are created by programmatically generating a mesh, assigning a texture to each pair of triangles, and ...
0
votes
1answer
511 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 ...
1
vote
0answers
55 views

Why is my diffuse lighting changing with camera position?

I am trying to do lighting in view space, but I am afraid I have an issue. I calculate the normals as: N = norm_mat * vec4(vert_norm,0.0) where norm_mat is the transpose(inverse(model_view_mat)). ...
1
vote
2answers
102 views

Vertical Camera Movement in a 2D Platformer

I would like to ask about how vertical camera movement should be handled in a platformer in which the player changes his Y position frequently. For the past two days I've tried to adjust the camera ...
0
votes
1answer
87 views

How to move 2D camera in OpenGL

I am new in OpenGL, I am making a game in 2D and I want the camera to follow the character. I started with gluLookAt() but I read that I could just move the matrix with glTranslatef() and It should ...
3
votes
1answer
130 views

How to mirror flip animation curves in Unity?

I have a animation that moves my camera from left to right. Now I'd like to copy it with 'mirror' transformation so I can use it to move from right to left. Is it possible to do it using script or ...
0
votes
2answers
340 views

Set new forward directions based on camera position

I have a 3rd person camera which can rotate around the player. When I look at the back of the player and press forward, player goes forward. Then I rotate 360 around the player and "forward ...
2
votes
1answer
219 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 ...
13
votes
2answers
3k 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 ...
1
vote
1answer
90 views

How can I implement a camera like the one in RotMG?

RotMG, an MMO top-down shooter, takes on a unique 2d-3d style, and has an intriguing camera; The game is obviously 3d, not simply isometric, and if you play the game and turn on camera rotation you ...
3
votes
2answers
503 views

How do I crop a camera's viewport?

I'm making an Android game using LibGDX. I would like to render a cropped version of the camera's viewport. Here's an original camera view (in 3ds max): I can get the same view in LibGDX without ...
0
votes
1answer
44 views

Camera stops moving forwards near World-Center

So basically this is a problem I've been having since forever. I implemented a Camera System, it works fine but somewhere around the center (0, 0, 0) of the world it doesn't work. Actually it works, ...
0
votes
1answer
82 views

Camera Touch Zoom and Pan with world - 2D

I am doing my first unity2d game and im in need of a little optimization for my camera. I have a camera which could pan and zoom with the speed i have defined. The problem with that is the speed i ...
0
votes
0answers
44 views

Orthographic camera and z-axis in 3D isometric view game

I'm working on a game in Away3d. I'm using an orthographic camera and I'm attempting to simulate an isometric view (the camera has a 37° angle and the y-axis is up/down, x-axis is left/right, and ...
0
votes
0answers
45 views

When camera moves the textures move and rotate

I recently followed the tutorial at PaulsProjects on shadow mapping. After finishing the tutorial all of my textures seemed to have vanished, then I moved my camera and the texture reappeared. But the ...
1
vote
2answers
47 views

Offset during zooming to keep object within boundries

I have a simple zoom feature which lets the user zoom in and out. I'm having an issue how ever when i zoom out the object gets smaller to the point that the boundaries become broken. The idea is the ...
0
votes
0answers
76 views

mouse-controlled third person camera

I have a simple camera that always stays a set distance behind and above the player. Mouse-on-screen coordinates are used to do Pitch and Yaw, and the keyboard is used to roll. I get how to position ...
0
votes
0answers
137 views

Camera Rolling when Implementing Pitch and Yaw

I am implementing a camera in opengl for an android game and am having problems getting the pitch/yaw/roll of the camera correct. I have read many tutorials on quaternions and have implemented a basic ...
0
votes
1answer
80 views

How to combine the camera that follows the player and the camera shake effect in Unity?

I need to combine both camera that follows the player and the camera shake effect in the same moment. The problem is in that, if I make the shake effect for the camera, then the camera doesn't follow ...
2
votes
3answers
222 views

How do I check whether a camera has unobstructed view of a GameObject?

I want to check if a GameObject is visible to the camera. The renderer.isVisible-method only checks if the camera is turned towards the object, not if there is anything between them (like a wall). ...
3
votes
1answer
159 views

Fighting Game Camera Positioning in SDL

I'm working on a 2D fighting game (using SDL) much like the original Killer Instinct on SNES. I want the camera to keep both players an equal distance from the left and right sides of the viewport. ...
0
votes
0answers
50 views

libGDX fixed object and camera do movement

I develop game to andorid and there is moving object with arrows - simple movement like in RPG games. I did: camera.position.x = PIXELS_PER_METER*man.body.getPosition().x; camera.position.y = ...
-1
votes
3answers
426 views

Move camera on X and Z only

How would you implement movement on a camera in order to always move it on X and Z coordinates, and if the camera has pitch yaw or roll it still moves only in those coordinates and doesn't fly up?
0
votes
1answer
342 views

Change players state and controls in-game

I'm using Unity 3D Let's say the player is an ice cube. You control it like a normal player. On press of a button, ice transforms (with animation) into water. You control it completely different than ...
0
votes
1answer
78 views

Move camera from wherever camera is to pinned point

So, I need to switch/ move/ animate camera from point X (not point A,as I don't know where the camera is at that momemnt) to point B (place where you want your camera to move). This is for ...
1
vote
0answers
151 views

Phaser / PIXI: World size vs. Stage size

I am using Phaser to build a "zoomable / pannable" 2D galaxy with the intended functionality being that the player's home planet is always in the middle of the World coordinates. I have a problem ...
3
votes
1answer
148 views

How do I output a webcam stream to a 2D canvas with SharpDX in C#?

I'm writing an application for the Oculus Rift using the SharpOVR library to access HMD position data. I decided it is reasonable to use SharpDX to also output webcamera streams. Unfortunately, all ...
1
vote
1answer
191 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 ...
0
votes
1answer
517 views

How can I make my player move in the direction the camera faces?

I have a 3rd person camera which can rotate around the player. My problem is that wherever camera is facing, players forward is always the same direction. For example when camera is facing the right ...
0
votes
2answers
178 views

FPS camera specification

I remember I once composed a FPS viewing transformation, as a composition of 3 rotations, each with an angle as a parameter. The first angle specified the left/right rotation around the y-axis, the ...
1
vote
1answer
237 views

How can I calculate the visible area of my camera in world space and take zoom into account?

I am trying to get the bounds from an orthographic camera in Unity which take into account the current orthographic size (zoom). I thought that I could use the cameraToWorldMatrix to transform the ...
0
votes
1answer
73 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 ...
4
votes
3answers
5k 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! ...
9
votes
4answers
2k views

Camera Control Techniques in Games

I am an MPhil student in Computing Science working on the problem of camera control in graphics. Though the literature of camera control dates back to the end of 1980s, the majority of them (up to my ...