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
72 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
79 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
666 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
595 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
3k 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
0answers
164 views

Asset imported from Magica-Voxel in unity is too big for the scene view

I am new to game development, I have created a game scene in MagicaVoxel (126 x 126 x 126 i.e full dimensions). So when I import it in unity (as an Object) the size of the asset is too big. So I ...
0
votes
1answer
37 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
734 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
267 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
168 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
199 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
420 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
905 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
224 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
84 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
285 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 ...
0
votes
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
354 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
539 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
47 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
656 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
609 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
224 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
826 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 ...
0
votes
0answers
286 views

Quaternions and Camera Implementation

I'm using OpenTK to make a camera rotation around with the mouse, and I'm using Quaternions to achieve this. But I ended up with results I don't want(2 Problems). Problem 1: The Camera Rolls on z-...
1
vote
1answer
546 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
358 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
553 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 ...
0
votes
0answers
91 views

Unity Editor - Camera's field of view rectangle is not visible permanently

I've been trying to develop a simple platformer game using unity via udemy course. The problem in my case is I cant figure where to place my game objects in Scene View. As when I select the Camera ...
5
votes
1answer
188 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
525 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
84 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
140 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
260 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 ...
0
votes
1answer
565 views

How do I delete instantiated game objects when they move off the left side of the camera?

The game objects move from the right to the left, via a separate, working script. I want them to be destroyed when they cross the left side of the camera. How do I delete instantiated game objects ...
0
votes
0answers
45 views

How to get the “(human) Face” position from Webcam Texture

I am searching a way to recalculate the current Position of the Face in "Virtual World Position" From a Webcam Texture. I was thinking about a way to solve this via taking the Average Pupillary ...
3
votes
1answer
418 views

Effect only on one object (two cameras)

I have a problem. I want a Grayscale effect to be applied ONLY to the chair on the stage. The chair has a layer CurrentItem. And I have two cameras: ...
0
votes
0answers
705 views

Why is Particle System Not Visible Without Scene Window Viewing the Origin?

I have a particle system, which is supposed to be highlighting an important game object, but the Particle System doesn't show on the game window unless the Scene window camera has the Origin (0,0,0) ...
0
votes
1answer
308 views

Passing Gameobject to another script in unity 3d

I'm trying to pass a gameobject from one script to another runtime attached script. My fisrt script is attached to the FirstPlayerController and the gameobject is not dragged in the editor, but is ...
4
votes
3answers
911 views

Constraining an orthographic camera to an isometric world

I am using Unity3D, and I am building an isometric world by rotating a plane on the Y axis by 4.205 units. I am using an orthographic camera. I want to constrain the camera so that the viewport never ...
0
votes
2answers
84 views

Why is Unity ignoring my camera on Android?

I am making a TV remote app for a specific android device (the Pixel XL, 1440x2560 resolution). However, when I put the app on my phone, it truncates most of the app. Here's what it should look like: ...
0
votes
0answers
56 views

Switching camera to follow object

I'm trying to switch one camera to another to follow the sphere. What's happening in my script is, at first the main camera focuses the ball and as soon as it is grabbed and thrown, the main camera is ...
0
votes
1answer
27 views

Libgdx is Character on Screen

Inside an entity class: ...
1
vote
1answer
675 views

Isometric camera movement

My camera system has two objects: the isometric camera itself, and an empty object it's attached to which handles both movement and rotation. When the player drags the middle mouse button, the camera (...
0
votes
0answers
58 views

How to configurate my camera Fps in OGRE 3D

How to move the camera similar to an FPS game?? I have a camera and two nodes. MyNode (this node have my objects) NodePerson My node is child to NodePerson and my camera too. My function is: ...