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
0answers
23 views

Add terrain collision and fix axis of camera

I made 3rd person camera script which works ok but needs few tweaks which I don't know how to fix. I'm using controller/ joystick. -Firstly, camera has this issue: when I look at the back of the ...
3
votes
1answer
157 views

“Pixel-perfect” camera positioning in 2d game

I am writing a 2d game using LibGDX. The view to the game world is top-down. The game shows a grid of lines, which looks nice when the camera is at its initial position (0,0). The problem is now that ...
0
votes
0answers
18 views

how do I know what blocks to draw in a lightweight Minecraft style game [duplicate]

I am creating a lightweight minecraft style test game in C++ using opengl es. I have come upon a problem while planning it though - what is the most efficient way to render blocks? I know about back ...
-1
votes
0answers
33 views

Quaternion Matrix Camera Example in LWJGL

Does anyone have an example of a quaternion matrix camera for use in LWJGL? I have been looking for months now and I cannot find a single complete example that contains an update function (showing how ...
0
votes
0answers
22 views

changing camera's reference point position by a keyboard event

I would like to change the camera's reference point position using gluLookAt. I would like that it changes when I press for exemle 'a'. I tried with: void VueOpenGL::Paint(wxPaintEvent&){ ...
0
votes
0answers
25 views

Unity game view differs from scene view?

I have an issue in which Unity is not showing the Game view in accordance to that of my Main camera despite setting them up as such in the photos. Would appreciate if someone could tell me where I ...
2
votes
0answers
79 views

Orthographic Camera and Raycasting in Three.js

I'm working on a test project porting a simple game from iOS to Javascript. I've got the orthographic camera working and it can view the objects in the scene and move up and down the tower of meshes ...
13
votes
6answers
2k views

Creating a seamlessly looping 2D multiplayer level?

A discussion came up recently about how to create a 2D side-scrolling multiplayer game that can have an looping level design (Think of Starbound and how their worlds are looping). I thought the ...
0
votes
0answers
37 views

2D Orthographic camera movement clamp in any orthographic size

I have a problem, which i currently can't figure out how to solve. I am trying to calculate a clamp value for world coordinates which have to respect any camera orthographic size.I bought an image ...
0
votes
1answer
97 views

Camera controller in a 2d platformer

I'm basically bumming around using Unity's 2D creation tools, and I've managed to create a little platformer physics demo. There's a lot of work to be done, but I've got basic movement down, some ...
0
votes
1answer
35 views

Rotating a view of a chunked 2d tilemap

I'm working on a top-down (oblique) tile-based engine. I would like for the tiles to have a definable height in the world, with Characters being occluded by them, etc. This has led to a desire to be ...
1
vote
1answer
32 views

Fit a bounding box in the scene modifying FOV

Suppose I have a radius for a spherical bounding box around a mesh. My goal is to render the scene such as when the camera moves, the bounding box whose centre the camera look at, occupies always ...
0
votes
1answer
93 views

TiledMap not drawing completely

While attempting to constrain camera scrolling to within the TiledMap I discovered that it seems the renderer for the map is not drawing the entire map. The map is 1600x960px so one would assume the ...
1
vote
0answers
62 views

OpenGL/GLM Camera

I want to make a camera that can freely look and walk on X/Z plane and rotate 360 degrees. I'm using OpenGL and the lookAt function from the GLM library to create the view matrix. I've looked through ...
0
votes
0answers
56 views

MonoGame - Fuzzy Pixels When Drawing (2D)

I apologize if this has been answered somewhere; I spent quite awhile searching but couldn't find an answer. I have any issue with my 2D sprites being drawn to the screen - either the non-moving or ...
0
votes
1answer
102 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 ...
1
vote
0answers
59 views

How would I warp a mesh with code?

I recently asked a question about putting a camera at the head of a 3D human model here and it worked out rather well and whatnot, but there is still a problem that bothers me: How would I ...
1
vote
0answers
25 views

Scale aware adaptive camera zooming

I would like to implement an interactive zoom on a 3d object with mouse wheel.A naive approach is simple where you just scale camera marix Z poistion or modify FOV.But I would like the zoom scaling to ...
3
votes
2answers
165 views

Three Screens = Three Cameras?

I have three screens which are at an angle to each other. Basically, the left and right cameras need to move relative to the main camera in such a way that it would look like each screen is a window ...
0
votes
1answer
97 views

Lock mouse in center of screen, and still use to move camera Unity

I am making a program from 1st person point of view. I would like the camera to be moved using the mouse, preferably using simple code, like from XNA var center = this.Window.ClientBounds; ...
1
vote
0answers
40 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
70 views

Pygame Scrolling Map

I have two questions. I'm working in a rogue-like and I've manage to implement a camera on the player, the camera shows just the players surroundings and is fixed in the side of the windows. The ...
4
votes
1answer
65 views

Lighting computation viewing direction

This is something that's really cooking my noodle. When I'm computing the light response for a material in my fragment shader, I'm using the standard 3 normalized vectors, in eye space: fragment ...
0
votes
1answer
60 views

Libgdx Do a fixed rotation for orthographic camera

Im trying to rotate my orthographic camera in the render loop to a fixed angle, but I can only make the camera spin with the code I got: in the create OrthographicCamera camera = new ...
0
votes
0answers
20 views

Is it possible to mask over CameraUI AS3?

My idea is to use the CameraUI to take a photo and then transpose that photo onto a blank sprite. So I want to have a mask layer over the CameraUI to line up the object with the size of the sprite. ...
1
vote
1answer
78 views

How do I create a camera?

I am trying to create a generic camera class for a game engine, which works for different types of cameras (Orbital, GDoF, FPS), but I have no idea how to go about it. I have read about quaternions ...
1
vote
1answer
147 views

How to prevent showing outside of Game Map ( Cocos2D-x ) ( Scrolling game )

I'm trying to make a tower defense game and it can zoom in/out and scrolling over my world map. How to scroll over the game and how to restrict it not to show outside of my map(black area). At below ...
14
votes
2answers
978 views

Camera vs Viewport

I'm don't have a clear understanding of what precisely is the difference between the camera coordinates and the viewport coordinates. Can anyone please clarify?
0
votes
1answer
65 views

Implementing Camera Zoom in a 2D Engine

I'm currently trying to implement camera scaling/zoom in my 2D Engine. Normally I calculate the Sprite's drawing size and position similar to this pseudo code: render() { var x = sprite.x; ...
0
votes
1answer
135 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 ...
1
vote
1answer
145 views

OpenGL - Calculating camera view matrix

Problem I am calculating the model, view and projection matrices independently to be used in my shader as follows: gl_Position = projection * view * model * vec4(in_Position, 1.0); When I try to ...
2
votes
1answer
60 views

Why are my 2D world click-positions offset after camera movement?

I'm writing a 2D game engine. I need to add a camera to my world that can zoom in and out as well as move away from its initial position at (0,0) at the center of the world. The main issue can be ...
0
votes
0answers
47 views

Issue with turntable rotation openGL

I am trying to implement turn table like rotation in my openGL app. In turn-table like rotation, z-axis is not supposed to roll. But in my app z-axis rolls like anything when I try to rotate the ...
1
vote
1answer
162 views

Displaying streaming video on dynamic texture

We are working in Unity 3D on pro licence and we are faced with the task to display streaming video as a dynamic texture in out Unity3D web project. We have a standard IP-camera , which is capable of ...
4
votes
3answers
229 views

Why does Unity in 2d mode employ scaling and the default othographic size the way it does?

I previously used SFML, XNA, Monogame, etc to create 2d games, where if I display a 100px sprite on the screen, it will take up 100px. If I use 128px tiles to create a background, the first tile will ...
0
votes
0answers
76 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 ...
0
votes
0answers
27 views

Why doesn't my game start in landscape mode?

I want my game to run on all Android devices in LANDSCAPE_FIXED mode, but this mode works only for some screen resolutions. PORTRAIT_FIXED works well for all devices. I'm testing this on and emulator. ...
0
votes
2answers
124 views

Smooth camera movement between followed objects

I have 2d game where my camera follows the player. Simplified, it copies the player position as its own. Now I have some other object in the game, that I want to camera to follow. This is easy enough ...
0
votes
1answer
120 views

Background Sprite Setting

For my 2d game, I want to set background image. So that I am using multiple background images for that purpose. But it can't set correctly on screen that illustrated in following image. Also for ...
0
votes
1answer
91 views

Free Look Camera Like Arma 2 while pressing ALT [closed]

I'm trying to create a simple script that give me the possibility to rotate the camera while pressing a key. So, in a pseudo-code way, how I can intercept the Input event and limit the player's ...
1
vote
1answer
170 views

LibGDX keep camera within bounds of TiledMap

I have a simple TiledMap which I can render fine. I have a player hopping (with Box2D) around and my camera follows the player around: cam.position.set( player.position().x * Game.PPM + ...
0
votes
2answers
68 views

Why does my side-scroller character move in the wrong direction?

I'm trying to understand why my rectangle moves in the opposite direction I want it to. I have a float for translation: glTranslatef(translate_x, 0, 0); if ...
0
votes
1answer
179 views

openGL Camera setup for Zoom in/out centered at point under cursor

I am trying to implement a zoom in/out navigation mode in a openGL 3dViewer. I was able to implement zoom functionality centered at screen center just by moving eye towards the center in perspective ...
0
votes
2answers
69 views

Player's camera, how to obtain smooth movement

In a 2D platformer, I have a player that can move both horizontally and vertically. I also have a camera that moves in relation to player. In every update I do this: public void RepositionCamera() ...
0
votes
1answer
54 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
146 views

Unity 2D camera drifts from player as speed increases

I have a dilemma that I did not have in XNA before porting my game to Unity. First-- my goal is to mimic Super Mario World 2's camera tracking in x. The camera tracks to 1 block ahead of the player, ...
1
vote
5answers
343 views

What is this type of camera called?

I am trying to find a name like "perspective view" of how a camera like this is called: It is 2d and 3d at the same time. I'm having a hard time trying to find the name.
0
votes
2answers
72 views

what function creates rotation effect in three.js?

which part of the code is responsible for the rotation in this example? Is it the camera or the scene itself? http://threejs.org/examples/#canvas_camera_orthographic
0
votes
1answer
79 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 ...
2
votes
1answer
119 views

Generating transformation matrix for 2D camera with pan/zoom/rotate

Question How do you implement a camera with pan/zoom/rotation for a 2d game? Is it acceptable to multiply together a series of transformation matrixes to generate a final transformation matrix that ...