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.

0
votes
1answer
30 views

Setting Camera's Viewing parameters manually

I am working on Context-aware camera in Unity. in this project i have to set parameters of the camera each frame manually depending on what camera sees on the screen. New View (v) direction is given ...
1
vote
0answers
473 views

How to reproduce this (parallax?) effect?

I'm wondering how to imitate the camera movement like in the gif below. It´s from a Android game. This game for example (via GIPHY) Actually, I am not sure if this can be called a parallax effect, ...
2
votes
1answer
434 views

In a shader, how to know if a given 3D projected point is visible by camera?

In a shader, I would like to know for a given projected 2D pixel if the related 3D point is visible by camera (not especially the main camera, the projection and view matrix are provided to the shader ...
1
vote
1answer
192 views

Move an object to a point relative to the second camera

I have two cameras, one for the UI, one for the 3d objects. The UI camera is just a simple, perspective camera. The ...
0
votes
0answers
120 views

Incorrect Vanishing Point in OpenGL

I was following the Deferred Rendering tutorial at learnopengl.com and after getting it to work, I noticed that the vanishing point changed to be the right-center side of the screen rather than the ...
1
vote
1answer
99 views

Compute “up” and “right” from a direction

I have a camera class that is missing some functionality. I need to give it the ability to, given a direction, or a point to look at, will rotate the camera left/right and up/down to look at this ...
0
votes
1answer
349 views

Aligning a weapon model with a first-person camera

The tools I am using are: gcc, opengl es 2 and glm. I am trying to align a weapon model with the first-person camera. The main issue is that I can not seem to figure out how to "anchor the weapon to ...
2
votes
2answers
51 views

GameObject transform with respect to local camera?

I'd like to recycle objects as they pass behind the camera frustum -- i.e, the plane of the local Z axis, orthogonal to the camera vector: ...
2
votes
1answer
316 views

How to translate the accelerometer input by specific angle?

I have an orthographic camera set on position(0,0,-10), rotation(0,0,0) and it's parent - <...
0
votes
0answers
485 views

Looking for example of Dynamic Split Screen in Unity 5 (see example)

I'm trying to figure out a dynamic split screen script (or other solution) for Unity 5 using a diagonal divider like in this example video: When the two objects being followed are close to one ...
0
votes
1answer
1k views

How to calculate view matrix for OpenGL 3.+ 2D Camera Roll

I'm trying to create a camera object for my 2D game engine, but I just can't seem to get the view matrix down right. Here's the code I'm currently using: ...
3
votes
1answer
92 views

Best way for first person view to look at a note/item and add it to inventory?

Implementation question from a beginner. I would like to implement a functionality to a first person game where the player can pick up notes lying around and have the note align itself to the camera ...
0
votes
1answer
1k views

How do I disable fog on specific camera/s

I'm building an FPS with fog and I want to include a dynamic minimap, showing the locations of player and enemies in real time. This is utilized by a second camera which is orthographic and looks at ...
0
votes
0answers
16 views

Ortbit camera rotation multiplication order with quaternions? [duplicate]

So I switched my camera to use quaternions and the first thing I noticed is that things started to 'roll' even though I'm not using any roll values. I looked it up and I found that people suggest that ...
0
votes
1answer
271 views

View “distortion” or “stretching” when looking up/down? (Software renderer)

I'm not sure distortion is the right way to describe this. I've uploaded a video to show you guys. Apologies if it's long, but I wanted to show the code as well as posting it here. https://youtu.be/...
0
votes
1answer
504 views

GTA style camera - Unity

I am wanting to make a 3d RPG with unity, and I'm in the planning phase. For the camera I decided to make it GTA style. I want the camera to be rotated around the player without effecting the movement ...
0
votes
1answer
1k views

FPS Player Camera Rotation using Touch

I am developing an FPS Offline Multiplayer Game. In my game the player rotates using mouse input. I want to rotate using Touch input.Touch to Swipe screen and player can rotate or Camera will be ...
4
votes
2answers
284 views

Third Person Camera Splines

I'm having trouble coming up with a formula/method of creating third person camera with a variable distance from the player given a specific camera pitch. This image shows something close to my ...
0
votes
1answer
81 views

Moving an object extremely close to the camera at a constant speed makes it visually speed up

I have a quad in 3D space (a billboard in the real-world sense) that I want to move close to the camera so the user can inspect it. The quad is defined by the 3D coordinates of its four corners. To ...
0
votes
2answers
423 views

How to make proper billboarding trees ? (Unity3D & C#)

I make a 2.5D first person game like Doom, Duke Nukem 3D, and Daggerfall used to be. I'm new to Unity and game development in general, so I'm sorry if this seems obvious to some people. What I want ...
-1
votes
1answer
119 views

Prevent perspective cameras from overlapping using multiple screens

I'm working on a shooting trainer project, where multiple cameras are placed beside each other to show a bigger range of environment. Each camera displays to a different screen. I find that the ...
3
votes
1answer
105 views

Help understanding camera/scene Unity

I'm a brand new unity developer and I watched a few tutorials and then found a game on the Asset Store to provide a nice base for my game. However the setup, especially with multiple scenes is quite ...
0
votes
1answer
1k views

What FOV does Unity show in a 16:9 aspect ratio, when set to FOV 60?

Preamble: I noticed the FOV in Unity is only correct when the screen resolution is square, in other words when the width of the screen is the same as the height. When you add more width to the ...
0
votes
1answer
509 views

OpenGL 2D camera

I'm trying to implement a 2D camera in modern OpenGL. Before I moved over to OpenGL, I used SDL to make my games and their concept of a camera is by creating a camera quad and each time the camera ...
3
votes
1answer
476 views

How do I change quaternion rotation to use the local camera axis rather than the world axis in DirectX 11?

I'm currently trying to rotate the camera around its local axis based on keyboard/mouse input and the code I currently have uses DirectXMath and works nicely, however it is using the world axis to ...
0
votes
1answer
179 views

How do I get the camera's local XYZ axis in Direct X 11?

I'm currently working on quaternion rotation and I have them working, but it seems to be using the world XYZ axis to rotate around, which is an issue as the camera rotates itself around an axis. ...
1
vote
1answer
103 views

Camera follows object and has a target object on the y-axis

I have two capsule objects in a split screen shooter. At this moment, the first camera follows player one, and has the target player two. The second camera follows player two, and has the target ...
0
votes
1answer
50 views

FPS controller initializing at bizarre location

I have got the hang of basic construction, terrain modification, applying materials, placing trees, etc. I have created a water plane, positioned my terrain above it, and am able to sink lakes and ...
0
votes
1answer
172 views

Problem calculating screen point for a point in a 3D world with view matrix and projection matrix

I am trying to calculate the 2D screen point of a 3D world position. For this I use the multiplication ViewMatrix * ProjectionMatrix. But I am not getting good ...
0
votes
1answer
190 views

2D HUD overlay drawing based on 3D coordinates and camera azimuth and elevation

Assume you have the 3d coordinates of the player and another unit N as well as the azimuth and elevation of a camera always looking at the player. In the following ...
0
votes
1answer
76 views

Camera type for puzzle game like tetris

I can't find what is the name of the camera type. Sided camera view seems logical but not correct thought
0
votes
1answer
841 views

OpenGL camera movement with mouse buttons

I am using modern OpenGL with glfw. I made a FPS camera with mouse and it works very well. But I want to move my mouse like Blender's model view mode. When I press the middle mouse button and move the ...
3
votes
1answer
2k views

Blur just one object in Unity

I've recently encountered a problem where I needed to blur an object that is inside another object. I've tried several methods to fix this but none of them works properly. In the screenshot below, ...
0
votes
1answer
270 views

Creating a 3rd Person Flying Camera for 3D asteroids game

In order to learn PyOpenGL and test out an engine I am developing, I am trying to write a 3D asteroids flying space shooter game. Currently, I am implementing the camera using a "look at" function ...
0
votes
1answer
159 views

If I want to create a top-down 2D game should I rotate the camera?

Do I have to rotate the camera to top-down view if I want to crate a top-down 2D game or just disable gravity?
2
votes
3answers
479 views

Unity 5.5 Android scaling

The questions I've seen are outdated, explained, not to my liking, or just don't work. Problem: I want to be able to create a game that can scale on all mobile devices with ease and with no ...
0
votes
2answers
745 views

How to import camera from Blender into Unity3D

I have a few cameras in Blender to export to Unity3D. They're exported as empty GameObjects, and that's what is expected. The idea is to have the main camera be a ...
1
vote
1answer
330 views

Help Understanding Cameras/View Matrices in DirectX11 (C#)

So I'm designing a soft game engine in C# on top of the SharpDX API (a C# wrapper for DirectX). As I'm designing the camera, though, I'm running into some issues getting the 3D perspective correct. I'...
0
votes
2answers
3k views

What are some common FOV for third person games? [closed]

I am trying to decide on a field of view (FOV) for a third person game and I really don't know where to start. It would be very helpful to have some points of reference from recent TPS games and the ...
0
votes
0answers
144 views

Disable global fog from camera [duplicate]

Does anyone know how to disable global fog from a particular camera? I have two cameras in my scene; one is a mini map camera, where I need to disable global fog. I have checked this answer and the ...
0
votes
2answers
2k views

javascript game camera that follows my player

I am experimenting with game developement here but my player disapears my player is alowed to just walk of the screen and never be seen again so i was wondering if someone could help me with adding a ...
-1
votes
1answer
794 views

Unity-How to use one scene's camera in another scene?

I have two scenes in my game, one is the menu scene with the UI and the other is the scene where all my game items are. Right now my UI looks too plain so what I want is to display my actual game ...
1
vote
2answers
616 views

How do I create a view matrix that does not contain the camera translation?

I'm looking at this tutorial https://capnramses.github.io/opengl/cubemaps.html about half way down the webpage, there is a description of a vertex shader ...
0
votes
2answers
683 views

How do I show a camera's field of view area through another camera?

I have a side camera that can be set on run-time with changeable field of view with GUI. I am searching for a way to show the field of view of the side camera using my main camera. I am thinking about ...
0
votes
1answer
474 views

Unity, Does camera ALWAYS render to RenderTexture?

I have a camera that renders a simple model to a RenderTexture. I then use that RenderTexture as a texture for my UI with a RawImage component. However, sometimes I disable my UI and therefore you can ...
1
vote
1answer
78 views

Unity reflections going white with camera movement

Please refer to this video to understand the issue I am facing. With camera movement, there is a strong white reflection that appears over the complete model. What settings do I need to change to fix ...
-1
votes
1answer
45 views

How to de/activate HDR option in camera with code?

I have some glowing objects in my scene, that with HDR off are inactive, so i want to add the option to turn HDR off in my settings to increase performance. If the code bellow is correct, what should ...
1
vote
0answers
50 views

Asymetric Perspectiv View

I am building a addon component that will show synthesized 3D view of the world (kind of FLIR camera simulation). The problem I am facing is that currently I am using Symmetric Perspective View with ...
0
votes
2answers
158 views

Move relative to screen

I use top down 60 degree tilted camera and want move always visually straight directions relative to screen (up, down, left, right). When object is near screen edges it starts moving diagonally (...
-2
votes
2answers
314 views

UnityEngine.Camera doesn't contain definition for “active”

So I'm just trying to create a simple script in C# which will allow me to switch between two cameras, named Camera1 and Camera2. But I have run into the error UnityEngine.Camera doesn't contain ...