Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
1answer
31 views

Move camera while dragging with mouse

I'm currently trying to implement a move-to-drag behaviour in a 2d grid based game. I want to update the camera such that if follows the "head" of the trail being drawn - In this case, the nodes it is ...
0
votes
0answers
43 views

2d top-down camera with rotation on a tile map [duplicate]

Update: My first post was considered a duplicate, so, I am rewriting this one because I have not found a solution, just partial solutions. I am working at a 2d top-down game with tanks, the map is ...
0
votes
0answers
10 views

Vuforia On Unity3D: Usage of Camera Focus modes?

I'm fidgeting with AR a bit, and reading through Vuforia's documentation I've found about the Camera Focus Modes. I'm using a DSLR through SparkoCam to do some tests, and have found that using this ...
1
vote
1answer
31 views

How to get a camera's frustum information?

I have a local coordinate system with three camera normalised directions, D, U and R. I ...
0
votes
1answer
28 views

Unity camera has no preview, and is not moving

I have set up a camera in 2D mode. There is only one camera named "Main Camera", and it is set to "MainCamera" (tag). In console I can see camera's transform position updating, but it isn't moving. ...
0
votes
1answer
40 views

Camera Movement - Snap Camera back to origin in relation to the player object

I am trying to implement camera movement like it is done in Guild Wars 2. Scenario is when A and D keys are pressed, the player rotates right / left and the camera follows and stays behind the ...
0
votes
1answer
32 views

Keeping 2 objects within cameras view

I have two object to control and I wanted to keep them at cameras view without adjusting the cameras size but the camera can move only in positive y-axis meaning ones it goes up it shouldn't move down ...
0
votes
0answers
9 views

Issues Rotating 3rd Person Camera Following an Object's Orientation

I've developing a flight simulation in openGL with GLM in C++ and I am having issues rotating the camera around as the plane pitch, yaws, and rolls. It's also my first time using quaternions, ...
-1
votes
0answers
30 views

Math for moving camera

I implemented camera look around with mouse, but it doesnt look 3d. This imgur shows what i mean better than i can describe it. https://imgur.com/a/gFb7kwX Right now i am using the DX and DY from ...
0
votes
0answers
12 views

Need help with camera zooming and orbiting in Unity

I want to make a 3rd person camera that follows and orbits around the player, and it needs to be able to zoom in and out too. For following and orbiting I use this code: ...
0
votes
0answers
42 views

Mouse click from screen coordinates to world coordinates in Orthographic projection

I'm trying to draw GL_POINTS at a right clicked mouse position, when I tried the following methods, https://gamedev.stackexchange.com/a/144667/99481 and https://...
0
votes
1answer
36 views

How can I recreate the camera used in Swordigo game?

What sort of camera does the Android game (2.5D) Swordigo uses? Is it an orthogrpahic camera? I think it is an angled orthographic projection. How can I recreate that sort of camera in Unity?
1
vote
1answer
88 views

3D Perspective issues

My team is currently developing a 3D Sidescroller game and we encountered some issues regarding the whole in-game perspective of the levels. The levels are composed of 3D modeled corridors which are ...
0
votes
0answers
43 views

OpenTK Camera isn't working

I've looked at many tutorials on this topic although there aren't that many, and I tried creating a 3d camera that can move while pressing WASD and such and it doesn't seem to work. Here are some ...
0
votes
1answer
39 views

Transforming 2D viewport coordinates after scaling the viewport (zoom in/out)

I've been getting started with personal experimentation and have been working on a project for a few days now using SDL2. It is a 2D game, and at this stage I have it rendering game objects in a fixed-...
0
votes
0answers
7 views

Appropriate camera-leap motion controller coordinates to stabilize hands

i'm using the leap motion example scene provided with the sdk (capsule hands-Desktop) but the hands are jittery and unstable and they often disappear from the view suddenly. I was wondering if there's ...
0
votes
1answer
24 views

How to persist Unity camera values changed while running/paused

I have a Unity program where all the GameObjects are created programmatically in C#, so there's nothing to see in the Scene window unless I hit play. I can hit pause and change the settings for a ...
0
votes
1answer
110 views

Minecraft/OpenGL - Create Multiple viewports

I'm working on a project for the game and i have been trying to draw a second smaller "window" that would act like a second camera, independent from the player. I have looked into glViewport however ...
1
vote
1answer
28 views

How to apply fast & slow camera transition

I know there is a lerp function there that smoothens the camera but I wanted it to work the other way around. Lets say starting position of the player is at the left side of the camera/screen and when ...
0
votes
1answer
66 views

unity 3d mouselook script help, weird issue

I'm coming back to Unity after a year or two of busy college and I'm having to relearn everything I've forgotten. One thing I cant seem to get right is this basic mouselook script I wrote. Here is the ...
0
votes
1answer
57 views

Can I position a player avatar behind the camera based on rotation?

I'm currently reverse engineering a video game where what's rendered on the screen depends on the proximity of the player avatar to the camera. As such, for my freecam to work properly, I need to ...
0
votes
0answers
12 views

Monogame 3d Camera objects in front same size than in background [duplicate]

i started to make my first 3d game but i have a problem with the camera and the projection Matrix, id like to have a view like the right image but i only got the left. How exactly look a projection ...
0
votes
0answers
50 views

How to completely stop the camera from clipping into the ground

Hi I'm trying to do a basic Camera Collision in unity, for convenience, here's the entire script (I actually got most of it from someone else who wrote the comments, if that's necessary to know): ///...
2
votes
0answers
50 views

Camera that follows a target with sub-pixel movement

As the title says, I have a character that moves at sub pixel movement (no, I can't change this, because this sub pixel movement happens when I normalize the vector during diagonal movements, ...
0
votes
0answers
45 views

Rule to change orthographic size to fit object inside camera rect

I'm working on a 2D zoom effect using an orthographic camera. So far I have a zoom value that I'm using but I would like to know if there's a rule or formula to obtain the exact size for my ...
0
votes
2answers
137 views

Moving a camera without rolling (tumble not arcball rotation)

I'm trying to move my camera around using mouse+keyboard. I'm looking for specific camera behaviour however, and I cant figure out how to get it right. What I've found, is that to get a maya/tumble ...
0
votes
3answers
49 views

Using Lerp to zoom in on an object inside an if statement

I'm trying to zoom in on an object once the raycast hits it in the Update method, I am using the Lerp method to make the camera movement smoother but it's not working properly. The object only lerps ...
0
votes
1answer
113 views

GLFW - Camera rotation system

I need to make a camera rotation system similar to the one here http://madebyevan.com/webgl-path-tracing/ To rotate, press the Left mouse button and drag. So far I figured a basic idea of how this ...
0
votes
1answer
117 views

How to remove horizontal black bar at the bottom of the game screen in libgdx?

Here is the screenshot .Here is my Play constructor in Play class.
0
votes
0answers
33 views

Camera zoom to point in Monogame

I'm currently working on a 2d isometric tile-based game with a camera and the functionality to zoom in and out. So far I'll take the center of the screen as "zoom point" using the following lines of ...
0
votes
2answers
52 views

Why is the Tilemap not fitting the screen?

I have a background image which I made it in tiled map editor of width 40tiles and height of 8tiles.When I run the game the tilemap bounces with the player and I can see the black portion of the ...
3
votes
2answers
102 views

How to make the camera follow the player in Libgdx?

In Play class I have the viewport of game height=320 and game width=240unitswith camera cam. I have set the camera(cam) viewport width to 10 and viewport height to 7.I have another camera hud whose ...
1
vote
1answer
35 views

My Canvas has an image which I am using for my background but it is blocking my Camera from seeing my Game Scene

So I am not entirely sure how to explain this as I have not had any luck searching online and I'm sure this is a simple problem but I'm being stupid and can't see it. I have a Canvas which is for my ...
1
vote
1answer
74 views

Follow Player which moves over a sphere

After hours of googling and pulling several hairs out, I decided to open this thread. I want to make a game, in which the player walks around a sphere (like super Mario galaxy) and the camera should ...
0
votes
0answers
47 views

Vulkan: Unable to render using multiple view ports

I have been trying to enable multiple viewports in my Vulkan Pipeline but have been unsucsessfull. I used this code sample as a reference point. The problem is that when I attempt to draw two side by ...
3
votes
1answer
45 views

SteamVR locks position of dynamically created cameras

I'm having trouble tracking down a problem with SteamVR. Here is a quick way to set up an MWE: Create a new Unity project. Import the SteamVR package from the Asset Store. Create the following script:...
2
votes
2answers
49 views

Custom Camera View Fustrum in Unity

Is it possible in Unity to make some sort of bounding box (with a running application) within the current viewpoint of the actual screen? Let me explain: I'm working on a project which uses a ...
0
votes
0answers
20 views

GLM: Camera attached to model moves in opposite direction from the model

I have been working on a component based engine with nested game objects each with there own transformation's. Each game object calculates its position in the world based on its parents world ...
4
votes
1answer
686 views

How can the board fit the screen perfectly in Unity's 2D Roguelike tutorial?

I follow the tutorial 2D Roguelike tutorial. I want to understand how happen that 10x10 board of 32x32 sprites covers screen perfectly? Like what does this depend on?
0
votes
0answers
15 views

Performance: Culling done right- farplane and other things

I have more and more "hipoly" characters in my scene now. One way to solve this "more or less beautiful" is making a farplane and adding some fog. But the performance still is quite bad. Isnt there ...
0
votes
0answers
22 views

Relative camera movement with character in center

I'm trying to translate and scale a 2D space from world space to camera space with my character in the center. Adding in the scaling is tripping me up. Here's what I've got so far, without the ...
0
votes
1answer
127 views

Camera with zoom that follows the player in javascript

I'm passing the time programming a little game in javascript, I've done what I'm trying this in several in game engine. And what I'm trying to do is generate the world while the player walks around ...
0
votes
0answers
11 views

Orbiting camera, that can move even if direction pararell to top

I am working on a 3D editor and for that I would like to implement orbiting camera. The camera works well, but when the camera's direction vector gets parallel to the world up axis, it gets stuck. At ...
1
vote
1answer
24 views

Does gluLookAt add or set the view matrix variables?

I'm trying to rotate the camera view in PyOpenGL, but it's not working well. The weirdest behavior I've noticed is that putting gluLookAt in a loop seems to change the camera view, even when I'm not ...
0
votes
0answers
27 views

anything wrong with a spherical camera view matrix?

Is there anything inherently wrong, if you derive your view matrix from 2 spherical coordinates (say, phi and theta) on the unit sphere? The z-axis vector would be at, say (phi, theta), the y-axis at (...
0
votes
1answer
66 views

How do I access device camera in GameMaker Studio 1.4?

I've looked everywhere in the documentation for GameMaker and I didn't find anything about how to access the camera.
0
votes
1answer
54 views

What is the most efficient way to render a 2D scene objects?

What is the most efficient way to render scene objects according to the current position of the camera (which will follow the player position)? A friend told me that since processors are powerful ...
0
votes
2answers
25 views

Swapping Y and Z causes problems with Camera

I am trying to swap the Y and Z axis in my program. Everything worked great when Y used to be the axis coming out of the plane. After having swapped y and x, I have been able to draw my terrain ...
1
vote
0answers
10 views

SceneNode transform and Eye and Center position

I am learning some inner workings of game engine development and have come across this confusion. To explain what I am trying to do, I want to start with an example: Let's say that I have an object (...
0
votes
2answers
46 views

Camera scrolling hiccups

I'm working on a 2D side-scroller, and I've got the technical aspects working. OpenGL renderer, camera movement using acceleration. However, while scrolling I'm constantly seeing tiny random hiccups. ...