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

0
votes
0answers
17 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 ...
-1
votes
1answer
62 views

Game Lag due to so many vertices and edges in Unity free version [on hold]

Actually, I'm new to Unity and I'm making a car racing Game. Now, I'm stuck at some point. My Problem is:- When i run my game into phone, It stuck badly and reason is--- Whenever there will be ...
1
vote
1answer
72 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 ...
0
votes
1answer
39 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
0answers
27 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 ...
0
votes
0answers
19 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
1answer
38 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 ...
1
vote
2answers
43 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
57 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 ...
1
vote
1answer
59 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
0answers
95 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
65 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 ...
0
votes
1answer
63 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, ...
0
votes
2answers
69 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 ...
0
votes
0answers
38 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 = ...
3
votes
1answer
129 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. ...
2
votes
3answers
176 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). ...
1
vote
2answers
67 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 ...
1
vote
0answers
94 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
95 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 ...
0
votes
1answer
58 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
1answer
144 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 ...
1
vote
1answer
32 views

Camera world matrix to view matrix

I've been working on a game engine and I model every object in my scene graph as an "entity" this includes my camera. My camera therefore has a position and rotation in world space and at the moment ...
0
votes
1answer
63 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 ...
0
votes
0answers
42 views

Camera rotation issue Libgdx

I have a OrthographicCamera and I want to rotate 90° it, but when I rotate it seems to be shifted more to the right. Before rotation: http://postimg.org/image/tc9jpq9zr/ After ...
0
votes
1answer
61 views

XNA: Camera's Rotation and Translation matrices seem to interfere with each other

I've been following the guide here for how to create a custom 2D camera in XNA. It works great, I've implemented it before, but for some reason, the matrix math is throwing me off. public sealed ...
0
votes
2answers
253 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 ...
1
vote
1answer
199 views

How to make an object move again after being stopped by collision in Unity?

I have a player object which position is always centered on the main camera's viewport. This object has a Rigidbody 2D, a box and circle collider. The player moves around a level, the level has a ...
0
votes
1answer
56 views

Problem with sprite direction and rotation

I have a sprite called Tool that moves with a speed represented as a float and in a direction represented as a Vector2. When I click the mouse on the screen the sprite change its direction and starts ...
0
votes
1answer
367 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 ...
1
vote
1answer
143 views

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

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 ...
0
votes
1answer
77 views

Doing a turntable camera animation on a world matrix rather than view matrix

I have a camera class that contains a 4x4 view matrix as a member variable. Most of my camera controls work fine when doing them directly on the view matrix. In an attempt to unify all of my scene ...
1
vote
2answers
332 views

How can I keep chase camera behind player when player rotates?

I have implemented a follow camera in Unity 3D. However, if the player object rotates, the camera does not rotate with it. To fix this I used RotateAround as follows: playerRotation = ...
1
vote
1answer
155 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 ...
1
vote
2answers
68 views

Setting up a camera to make the world look large

I am attempting to configure my camera to give the impression of a normal sized player in a giant room. Since units are arbitrary, I figured this should be possible (despite the fact that the room is ...
0
votes
0answers
51 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
228 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
24 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 ...
0
votes
0answers
23 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
123 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
1answer
650 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 ...
14
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
55 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
588 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
63 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
49 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
104 views

TiledMap not drawing completely [closed]

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
87 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
88 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
276 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 ...