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

Questions tagged [camera]

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

1
vote
1answer
33 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
88 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
56 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
29 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
56 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. ...
0
votes
0answers
21 views

Unity: camera moving up and down for no reason

I have a standard camera in my scene. With standard I mean the camera you get when you click right mouse > Camera, with no modification except for the transform position and rotation. Then I attached ...
0
votes
0answers
32 views

Change axis to view world from above in Unity

Developing a 2d game where you view the "table" from above (think of a card game being played on a table). I have a candlestick on the table, but I must have something wrong because when I run it, it ...
0
votes
0answers
50 views

Cocos2dx Follow action is not working

I am making a 2D platformer game and I want my camera to move with the player sprite. There's a Follow action in cocos2dx which I used but Its not moving the scene as expected. Please take a look at ...
0
votes
1answer
375 views

How can I emulate Diablo 3's Isometric view using Perspective?

Using DX11, SimpleMath I am building a isometric game like Diablo 3 in 3D and I want to use a perspective camera that emulates their top down view. Projection Matrix: ...
0
votes
1answer
73 views

LibGdx Positioning the camera

I've been following some tutorials about libGdx and I've tried to create a 2d platformer but I've got stuck at how would be the right way to make the camera not go out of the screen when the player ...
1
vote
1answer
264 views

Implementing Screen Shake

I'm looking to implement screen shake in a 2D top down game. From an earlier Q on this exchange, I learned that noise values could be a good candidate, so I intent to try that. But I wonder: is a ...
16
votes
3answers
3k views

What is “simulated human operator” cutscene camera movement called?

I have some questions related to the non-smooth camera movement in cutscenes of quite a few games which appears to try and simulate the nervousness of a human operator holding it. This is opposed to ...
0
votes
1answer
64 views

How to Keep Unity From Changing Sprite When Changing Orthographic Size?

so I have a simple X animation, and at the end (when it looks like a full X), it looks good on one orthographic size, but bad on another. Here's what it looks like when the size is 3: Now you can ...
0
votes
0answers
88 views

How can I move the camera with touch, without ignoring rotation?

I am making a game like this with LibGDX for android. My first step was to create the camera, which can be moved with touch events. I have some problem with that. The camera is on position 100, 200,...
0
votes
2answers
116 views

Parts of sprite disappear when zoomed out

I'm playing around with making a roguelike and I want to use ascii characters as tiles in the game. I'm using a 256x256 sprite map where each character ends up being a 32x32 box. This works fine, ...
1
vote
1answer
376 views

Record video and sound from device camera and show it as a texture

I need to record and show video from a real camera device in iOS/Unity and show that video as a texture in RawImage (Image of what I want) What I have tried so far: Unity WebCamTexture API: It ...
0
votes
0answers
30 views

Projective texturing in DirectX11

I'm trying to implement reflections on flat surfaces and render a simple scene with a reflection. So I'm rendering the scene from the point of view of a camera symmetrical to the reflection plane and ...
0
votes
0answers
99 views

Tried to make Quake/Half-Life camera act like it does in Mario64/Sonic Adventure but run into a weird bug

So I am trying to implement such a system of controls and camera where moving left would mean moving to the left of the camera's current view direction, etc. I think this is also called movement in ...
0
votes
0answers
25 views

Calculate 3d object size to fill all screen.

I have a 4 rectangle 3d objects with size of entire screen that make a cube together and rotate. And i have problem with responsive on different aspect ratios and rotating. A calculated the size ...
0
votes
0answers
22 views

Determine how far from the camera bounds the player is in Unity

I am using native Unity Camera component. How could I get the distance from the bounds of the camera to a GameObject? In my ...
1
vote
1answer
47 views

LibGdx Camera Movement

I just started learning a few things about libGdx and i don't really understand how the camera works because i've created a camera, then set the camera position to viewport.getWorldWidth()/2 and ...
0
votes
1answer
70 views

What am I missing for this flycam to work correctly?

Through reverse engineering, I've found an instruction to inject on which allows me to obtain the XYZ coordinates of the camera, as well as pitch and yaw. Thus, I have the following: camX (Plane)...
0
votes
0answers
72 views

GLFW shift key not behvaing like other keys

I am using GLFW 3.2.1 Currently I am implementing a camera. For the vertical controls I am using space to go up and shift to go down. For all other keys, pressing the key results in the section of ...
1
vote
1answer
84 views

Unintended stuttering when moving camera

I am using opengl and GLFW to make a rendering engine. Things work per se, but there is some weird flickering happening when I move the camera. Due the nature of the problem I need to link a ...
2
votes
1answer
175 views

One pixel lines flash on tile map when camera moves

I'm writing a simple game using Phaser 3.5.1. I made a 20X20 over world tile map for my hero to walk around on with the camera following the hero. I was able to implement tile based movement using ...
0
votes
1answer
63 views

Camera follow while dragging object

I am working on Bowlingball game. And when I move the ball left and right by touching or clicking the camera moves, but it also makes ball keeps moving in the same direction even though I just moved ...
0
votes
2answers
47 views

How to keep an object in a certain part of the camera view?

I have a 3d camera that is viewing a character that is moving. As the character is moving i want the camera to adjust itself so as to keep the character in the left third of the camera view. I ...
0
votes
1answer
32 views

Zooming versus panning in a 3D FPS fly camera

Imagine you have a strategy game, and it's rendered in openGL, in 3D. You have an overview of the map and the camera is currently looking at the direction of the ground at some angle (but is not ...
3
votes
1answer
81 views

Why does this work? - camera rotation from screen space

I do not understand the math behind the linked function or why it works. I would like to know this. https://sidvind.com/wiki/Yaw,_pitch,_roll_camera ...
0
votes
0answers
20 views

Unexpected Camera Rotation in Unity

I've been writing a custom third person controller and I almost have the camera working the way I want for basic movement. The problem I am having is that whenever I rotate the camera with the right ...
0
votes
0answers
131 views

Best way to dynamically assign a camera?

(cross-posted on answers.unity.com, no answer there so trying over here) I want to change the camera dynamically at runtime, to see the view from a player, an enemy, etc. when I fire an event like ...
0
votes
2answers
222 views

Monogame Move objects while having a moving 2D camera

I am writing my first game. In this game, I have a heroEntity object, which has fields: ...
1
vote
1answer
86 views

Camera movement issue with pitch and yaw angles

I'm trying to implement a simple first person camera using pitch and yaw angles (no quaternions, I want a simple camera for debugging purposes). An Input class processes mouse input and translate the ...
0
votes
1answer
17 views

Pull OVRCameraRig over RTS map via touch controller grabbing gesture

Currently developing a little prototype RTS with the Oculus VR devkit. I want to implement camera movement via "grabbing" onto the world space with a touch controller and move the OVRCameraRig object ...
0
votes
0answers
26 views

using batch.setProjectionMatrix puts sprites out of cameras view range

I'm slowly following games from scratch tutorials and although through my mistakes in figuring out a lot of things I'm struggling to understand cameras and viewports. So far I have managed to grasp ...
0
votes
1answer
26 views

Camera not in sync with player

I am currently working on a game in XNA and MonoGame. This game is supposed to be a port of KidsCanCode's tutorial series of creating tile-based games in Python. Here is a link to one of the videos in ...
2
votes
1answer
580 views

Is there a way to make a game object invisible to only certain players?

I have found a few posts and blogs here and there. But all of the solutions they provide seem to be global. Is there a way for let's say a multiplayer scenario where maybe an enemy has a cloaking ...
0
votes
0answers
47 views

Rotating a camera around an object with PhysX

I'm working on a PhysX project with GLUT and I'm attempting to have a camera rotate around an object, steered by the mouse. My first step was to port over the C# code found here: http://wiki.unity3d....
0
votes
0answers
29 views

Unity render custom layers with Camera.render();

I'm trying to render a simple Quad in a quite unorthodox way, by using Camera.render(); The quad is assigned to a custom layer called "Test" The script I'm attaching to the main camera is as simple ...
0
votes
0answers
112 views

Why do I see blurring lines when moving a camera, and how can I fix it?

I am using Monogame and I'm rendering the terrain as tiles. I am bringing in the tiles from Tiled. When I move my camera up, I get these lines that seem to be blurring the tiles together. Please ...
0
votes
2answers
30 views

What information would I need to calculate proper placement of my Unity 3D orthographic HUD elements?

I have a Unity project and I have managed to create a 3D HUD by creating a separate (orthographic) camera for rendering elements on the UI layer. I already have some objects appearing in the HUD and ...
1
vote
1answer
134 views

Keeping 2D camera within game bounds

I have a simple camera class which works for following my character around, and has an adjustable zoom. However, I cannot figure out how to keep the camera within the bounds of the world. As far as ...
0
votes
1answer
38 views

Box2D and OrthographicCamera working incorrectly

I'm trying to build a simple game where TileMapRenderer renders a labyrinth, a ball moves in it and camera follows it. I'm currently having the following bug: For some reason, the game renders the ...
0
votes
0answers
64 views

Unity smooth following 2D camera not working properly on different resolutions

I´m working in a third person 2D game with oblique camera view in Unity and I want the camera to follow the character smoothly. I´m using Vector3.lerp and works like a charm in mostly all the ...
2
votes
1answer
103 views

Pitch becomes yaw as camera gets near object

I have been having trouble with my camera, first encountering the roll tilt that is so many times asked... I fixed that issue by following the instructions at this link: Unwanted roll when rotating ...
1
vote
0answers
62 views

Given the size of far and near plane, find other parameters of a frustum

I am trying to find the correct parameters for setting up my perspective camera. But I don't know the mathematics involved in that. Can somebody point me to the right direction? My near plane should ...
0
votes
0answers
22 views

How to setup camera to move to a different location and back in Unity 2D game using cinemachine

I am working on a 2D unity game and am trying to use cine machine for small animations within the game. I have a door trigger somewhere in the level, when the player activates that trigger a door ...
0
votes
1answer
42 views

Unity 2D camera behaviour

I am trying to create camera behavior where camera moving slightly forward the player along his movement direction to extend the visible area. For camera movement, I use an empty object which moves ...