Stack Exchange Network

Stack Exchange network consists of 175 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.

5
votes
3answers
6k views

How can I make my Camera's RenderTexture output have a transparent background?

I'm writing a 3D game using Unity 2017.1.0b1. I have a disabled Camera that takes a "snapshot" of the current scene and stores it in a RenderTexture when a button is clicked. I then display the ...
1
vote
0answers
230 views

get position of GameObject on rendertexture from camera

I'm rendering the camera output to an rendertexture on a plane. This works fine. But I want to put GameObjects on the rendertexture on positions of world objects that are visible on the camera. <...
3
votes
1answer
280 views

How do I move a camera to a new X and Y position when the player collides with a certain object?

The lowdown is this: I'm making a 2D overhead game that takes place in separate screens in a room. Each screen is separated by a few blocks of black space (to give the impression of screens being ...
3
votes
1answer
3k views

lookAt with orthographic camera (gl-matrix)

Technically this is a webgl question though I think it's generic enough to get some opengl, erm, perspective on it too... If I setup an orthographic camera (perspective matrix) like this: ...
0
votes
1answer
129 views

First-person shooter -style controls [duplicate]

This is not in regard to a video game, but to a 3D model viewer someone else created and I am modifying. I would like to implement first-person -style mouse and keyboard controls in the viewer, so ...
0
votes
1answer
31 views

In AGK2 Basic, how would I attach a camera to the player charater?

I've started making a game in AppGameKit and I'm using Tier 1/AGK2 Basic. I'm trying to make a sort of endless runner. I've made it so that the player stays still and the rest of the world moves ...
1
vote
1answer
102 views

Camera math: How to calculate the horizontal and vertical angle from the look at vector

I'm using the PerspectiveCamera class in C#/WPF to implement an FPS style camera. For that, I would need to offset the camera's horizontal and vertical angles every time the mouse is moved. The ...
0
votes
1answer
184 views

Implementing a scrolling UI in Libgdx

I am using the LibGDX framework. I'm not using Scene2D but I want to implement my own "scrolling UI". This is only what I could think of (see image below): I will make the 2nd camera look at very far ...
1
vote
1answer
28 views

Stop displaying a camera sign in a Scene view in Unity

How can I stop displaying a camera sign in a Scene view in Unity? I mean that white thing you see below:
1
vote
0answers
258 views

Unreal: Y-Axis boundary on a Camera Bounding Box

I was wondering if I could get some help with modifying a Blueprint I'm currently using for a project in Unreal Engine. I am currently attempting to make a side-scrolling platformer game and I'm ...
0
votes
1answer
81 views

Field of view or resolution?

I'm new to CG and I'm building a ray tracer. I don't quite understand how to set camera parameters and film(pixel plane) parameters. Say I want to get an image of 400x300 resolution. I can set an ...
1
vote
0answers
149 views

How to integrate android camera for LibGDX project? (deprecated material..)

I'm trying to use the Android camera in LibGDX. I tried using this implementation of the API, which is basically the only you will find on Google. https://github.com/libgdx/libgdx/wiki/Integrating-...
0
votes
0answers
398 views

Unity : orthographic camera and shadow

When using an Orthographic Camera, the shadows appear to be of poor quality. How can I display smooth shadows?
0
votes
1answer
517 views

Fixed camera rotate to follow character

I have a camera in a fixed position in the middle of a field, and I would like to rotate the camera to follow the character as it moves around. There is no point lower than the camera, but I would ...
0
votes
1answer
82 views

How to simulate camera turbulence for in-game cinematics [closed]

Are there any good algorithms for generating a convincing turbulence effect that can be applied to an in-game camera. For example, in use cases such as the viewpoint of a plane flying low and fast ...
1
vote
1answer
80 views

How do I make the camera aware of the position of the object it is tracking?

I'm making a 2D game with a Camera that tracks GameObjects (usually the player). At the moment, a ...
1
vote
1answer
53 views

Why is my camera movement not working as expected?

I'm doing a 2D Tile Game in Java. It should be the right calculations to make the camera following the player only if it is located at a distance from the center of the window, but this only works the ...
0
votes
1answer
813 views

Move Camera After Player Moves Certain Distance

I've got a 3D mobile game with the player centered in the middle of the screen, and a camera looking down on top of the player. The player is controller by an on-screen joystick. Currently when the ...
0
votes
1answer
714 views

Visualizing NavMesh to Camera

When Unity builds a NavMesh, you can see it in the scene view if you have the Navigation window open and select "Show NavMesh" in the Navmesh Display box. I'd like to use the exact same overlay in a ...
0
votes
0answers
51 views

How to abstract mouse movement event streams for networked multiplayer?

I'm building a mouse driven 3rd person shooter with client-server network architecture. My input system is event based. Keyboard input is captured by keys.S.onUp() ...
-1
votes
4answers
4k views

Only make camera follow player on x axis?

I need a script to make the camera follow the player but only on the x axis so its like mario where when I jump the camera doesnt go up.
0
votes
1answer
48 views

Restrict the rotation of the camera using button

I've been trying to limit the Y-axis of the camera rotation but I'm out of depth until now. I'd looked up many tutorials and I found the clamping method, but I seem can't get it to work on my code, ...
3
votes
1answer
826 views

Unity- how to render-to-texture with VR distortion

I've also asked the question here http://answers.unity3d.com/questions/1392099/how-to-set-a-render-to-texture-camera-to-be-a-vr-c.html (but it's currently "under moderation") So, I want to do some ...
1
vote
1answer
351 views

Room-based camera movement

I'm trying to make a camera system where the camera never goes outside the edges of the current room (like Link to the Past or Mega Man, for example) This is what I have right now: ...
1
vote
0answers
207 views

remove sudden upward & downward jerk from camera

I have a scene with low poly assets & NavMesh enabled for character navigation. When player climbs the bridge there's a sudden upward jerk in camera. Also, when the player comes down, there's a ...
1
vote
1answer
51 views

Why “polar angle” should be restricted to the range of [0,PI] when moving camera?

In the sample code d3d12book-master\Chapter 6 Drawing in Direct3D\Box\BoxApp.cpp of "Introduction to 3D Game Programming with DirectX12 : Frank D. Luna", the camera ...
3
votes
2answers
214 views

How can I draw the “cone of view” of a camera in a flat 2D minimap?

I have a 3D world with some model in it (the XZ-plane grid, some gray boxes and a red box). In the upper-left corner I'm trying to draw a minimap that should represents the whole world in 2D (flat). ...
1
vote
1answer
479 views

Phaser Always Fix Camera Position to Sprite

I am developing a cross-platform overhead game using Phaser. Is there a way to always fix the position of a camera to a sprite? The following function works great, but I want the camera to always be ...
1
vote
1answer
1k views

LibGDX - managing zoom

Zooming an OrtographicCamera effectively changes the amount of world units that can be shown in the camera window. Should thus the camera viewport dimensions be correspondingly updated upon zoom? For ...
1
vote
1answer
270 views

Preventing a Child object (eg. some weapon) from going inside other objects in the scene?

I have Cube with a sword like object as its child object. But when the cube moves in the scene the sword goes into the other objects in the scene. The sword have a BoxCollider attached to it but the ...
1
vote
1answer
90 views

When creating a UI scene in Unity, should I render the canvas in camera space?

I'm working on a scene that is strictly going to be used for character creation. Can anyone explain what the best practice is for a scene like this? Should I render the canvas to the camera, or ...
4
votes
1answer
305 views

Need an option to send camera output as video or frames in Unity3d 2017

Tools I've used in Unity 5.x are breaking my 2017 scene... and I do not see a way to output video or frames from Cinemachine (although I am trying to understand all of its features). What is the best ...
1
vote
1answer
2k views

Unity - blur on one camera effects the other as well

I'm trying to fake a DOF effect for Sprites by using 2 cameras, one for the sharp objects, one for the blurred ones. I have set up the layers like Blur and Sharp accordingly. So I have these 2 ...
2
votes
1answer
424 views

LibGDX - Camera and viewport initialization in show()?

I'm reading the book LibGDX game development by example and the author tends to follow a pattern like ...
0
votes
1answer
569 views

Set custom Yaw Pitch and Roll in Three.js

So I have the following struct in C++, it gets updates with the values of an program that uses a camera in spectator mode: ...
1
vote
1answer
37 views

How to fold a view from 2 3D cameras in Unity?

I need to combine view from 2 or more 3D static cameras. Let's say I have 3 humans standing in line side by side. The first camera is viewing the left person and the left half of the middle person. ...
0
votes
1answer
48 views

Third Person SpaceShip Camera Directx9 follows objekt but gets weird after moving object

We have the following code. It should follow the game Object in every step but it does not. In the beginning we can rotate the object where ever we want and it works but after moving it some the ...
0
votes
1answer
811 views

Three.js recover camera values

When I start the script, camera has starting values. When I will move it and click button to set up startign values it is never same. What values I missed? The best way, I suppose, it is to look at ...
1
vote
1answer
691 views

Why is my Canvas/RawImage not included in my Camera's RenderTexture output?

In my Unity2D game, I'm using a second camera to "screenshot" the current view. I then display this screenshot within the game. This works the first time I take a screenshot. When taking the second ...
0
votes
1answer
265 views

How to create a Pixmap from an OrthographicCamera in LibGDX

I am trying to create a picture based on what one of my OrthographicCamera can see. LibGDX has a ScreenUtils class that has a <...
2
votes
1answer
1k views

Constraining camera bounds within bounds based on Unity UI object dimensions

I have a perspective camera which has bounds which I wish to constrain within larger bounds. All the bounds are calculated in world space. The code for containing the camera within the constraining ...
1
vote
1answer
614 views

Rotate camera around its center in 2D

I'm currently trying to develop my own little game engine (trying to understand maths in games). I have implemented 4x4 matrices and 2d vectors (I don't need 3d since I'm aiming at orthographic ...
0
votes
2answers
404 views

Rotate camera around point of view

I'm trying to rotate the camera around the view point of the camera. So when the user looks at a build the camera rotate around that building. But the camera does not need to have the building to ...
1
vote
0answers
645 views

Null Reference to camera when loading new scene

I am getting the error: MissingReferenceException: The object of type 'Camera' has been destroyed but you are still trying to access it. Your script should either check if it is null or you ...
5
votes
1answer
204 views

Rotation + Translate causes camera shakes

UPDATE: I have found that the delays happen when i press a key in the keyboard and move the mouse at the same time, how can i solve it? I checked it setting a constant speed to the camera(going ...
3
votes
0answers
657 views

Run Unity standalone in Headless Mode whilst capturing screenshots

I need to create a unity project which runs in Headless mode (using the -batchmode command), but it must capture screenshots e.g. every one second and write them out to a file. I understand that in ...
0
votes
1answer
95 views

What's the difference between Camera::getPosition() and Camera::getPositionForViewUpdate()?

In Ogre3d, what's the difference between methods Camera::getPosition() and Camera::getPositionForViewUpdate(), official ...
0
votes
1answer
153 views

Offset on camera following object that accelerates

I have camera a that is actively following an object (a plane) from behind. This object can accelerate or decelerate. I would like to have a camera offset when I move the plane, so it doesn't look so ...
2
votes
3answers
291 views

How to keep track of camera's rotation while it's being rotated?

I'm building a 2D game where the sole interaction of the player is rotating what they can see (this is currently the camera, though it could be the world) by plus or minus 60 degrees. My current ...
0
votes
3answers
2k views

Capturing video with sound, from cameras in Unity?

I want to capture video from cameras and save them in Unity. There is a function Application.CaptureScreenShot() but it only captures images. There is another ...