Questions tagged [camera]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
19 views

Unity 2D Tiles disappearing when i zoom in

All my tiles/sprites have 0 as their position on the Z axis, except my main cam which has -10. For some reason i suddenly couldn't zoom in without everything disappearing, I switched to 3D view to ...
0
votes
1answer
20 views

How to Bring the Scene View Camera Controls into Game View

I've got a scene with a big sphere in the centre (the Earth) and a lot of smaller spheres around (the stars). Above is a screengrab in Scene View with the camera in the Front View position. I really ...
0
votes
1answer
45 views

How to place a camera so that it always fits a plane?

I have a plane that can get its scale changed during the game, and I want to make the camera view it completely every time the plane has its scale changed. The only camera is set to perspective ...
0
votes
1answer
47 views

How to create video from camera?

I have a 3d scene and a camera; I want to create video file from camera pre-set movements. If it is possible, running application by command line (without needed to "show" at video, my camera) . Is ...
0
votes
2answers
47 views

How do I remove the objects when it is not seen on the camera?

I am a beginner C# Developer and I am creating my own version of the "No Internet Dinosaur Game." How do I remove the Object like (Platforms, Cactus, etc.) When it is not seen on the camera?
0
votes
1answer
15 views

VR Camera and Hands height

Using the Oculus Rift S, I just added OVRCameraRig and LocalAvatar or OVRPlayerController and when I press play I feel like I'm not as high as I want in my vision and hands, I change the position of Y ...
1
vote
0answers
52 views

How can I apply my camera to all graphics objects?

Is there a way to have the camera be applied to all objects? Can you have the camera effect objects that where made with glVertex3f(); This is the fourth time I ...
0
votes
1answer
19 views

Unity Tilemaps not Rendering as I move camera

As I move the main camera in my Unity game towards the left or right, the camera just stops rendering any of the tilemaps in the scene. Here, the camera is at x = 25.7, and the preview isn't showing ...
0
votes
0answers
15 views

How to avoid camera jerkiness when using integer-based movement with a remainder?

I am experimenting with a low-res project in GameMaker 2. To preserve the pixel art and prevent distortion, I have my movement code set up to only move my sprites in integer intervals. Basically, ...
0
votes
0answers
11 views

Howto setup screen with cameras and viewport to achieve splitscreen as specified (LIBGDX)

I played around with cameras and viewports, but all my settings had no effect. Also read several topics about this, but still don't understand the concept. What I want to achieve is what I show on ...
0
votes
0answers
8 views

Camera rotates without camera reference

I have the camera set to go behind the object called "cameraS" and set it's x rotation to that object, and to move forward and backward along the axis behind the object. For some reason, when it moves ...
0
votes
1answer
35 views

Setting SteamVR Camera Target Eye before SteamVR installed in Unity

I'm writing a plugin that can be used in both VR and non-VR projects. I have a Camera that is used to display UI containing some game info on a secondary monitor. My problem is that when the end-user ...
1
vote
0answers
23 views

RTS camera acceleration

I have an RTS game with a camera that can be controlled by either edge-pan, gamepad analog stick or keyboard buttons (WASD). The speed and snappiness are good for the general case, but sometimes feels ...
0
votes
0answers
51 views

How can I get my entire game to scale based on screensize?

I'm currently building a 2d mobile game and I'm currently stuck trying to get my game to scale with screen sizes. Currently my background is scaled to 1920 X 1080. When I run the game on my Galaxy S10+...
0
votes
1answer
23 views

I created a preview of my player camera with another camera but when disabling the main menu it show no cameras exist why?

I created a Render Texture named it : GUICameraRenderTexture This is a screenshot of the Player camera : I assigned to the Target Texture the new GUICameraRenderTexture : Then on the bottom of the ...
0
votes
1answer
30 views

Stream Clients Cameras from Server Side

There's a way to see specific client Camera from server (using RawImage ..) and sync view. I tried RenderTextue, but i didn't find a solution for that.
0
votes
1answer
30 views

When I press play in my scene, the camera turns in the opposite direction?

In my scene, I have my character facing a certain direction, with a camera attached. Now, when I press play, for some reason, the character immediately faces the other way. I've tried turning the ...
0
votes
0answers
13 views

Setting a 2D Polygonal Collider to Camera Size

I'm trying to resize a polygonal 2d collider to the size of the camera. Here's what I've got so far: ...
0
votes
2answers
54 views

FPS-like mouse-look camera WinAPI problem

I have a problem with implementing mouse-look camera movement, like in FPS games. For me common solution is: Process WM_MOUSEMOVE event in ...
0
votes
2answers
130 views

Unity3D - Camera Jitters When Displacing and Rotating Smoothly

DISCLAIMER: I am using Unity 5.6.5f1 for this code, I honestly don't know if there would be API updates on later versions, though I don't think so. I tried to make a simple Third Person Camera that ...
0
votes
1answer
30 views

How to draw a rectangle with a border pixel over a camera/viewport?

With this code I intended to visually delimit the complete view of the circuit and the two controlled cars: ...
0
votes
1answer
20 views

Unity - Apply different Near/Far clip plane value for different layer

I am Lerping the Near value of my camera, from 0 to 38, and it gives this result: change near clip plane effect As you see, it gives a nice effect. But now I would like the effect to occur only for ...
0
votes
0answers
39 views

Confused on graphics rendering

Implementing a viewport is just a rectangular space on the back buffer usually a 2d texture set to the size of the client window that we render to. However in direct3d when we describe the viewport ...
3
votes
1answer
82 views

Selected enemy off camera

I'm facing a problem with a game I'm making. Currently I can select an enemy and mark it as shown on the image: But now I want to show the position of the selected enemy on the screen when it's off ...
0
votes
0answers
42 views

Logic behind a cubic reflection

I'm creating a cube in WebGL made of mirros that have to reflect the object inside of it. At the moment I'm stuck because I don't understand the correct logic to implement to achieve the result. I ...
0
votes
1answer
30 views

How to change TPS camera angle in Unity

I'm very new to Unity and this may simply be a failure of google-fu but I hope someone here can help me out. I'm working through a series of tutorials on how to create an RPG in Unity, making small ...
0
votes
1answer
13 views

Problem displaying drawing of a path in camera/viewport

I have an adm object, which draws the path in the room like this (Object ADM - Draw Event): ...
1
vote
0answers
59 views

The Google Earth solution for panning in a 3D world

About a year ago I made a solution for panning and zooming in a 3D world (Three.js) using a formula provided by @DMGregory. Here is the post: How to panning camera on XZ axis with different angles ...
1
vote
1answer
56 views

Quaternion.slerps resets camera rotation to (0,0,0) when i go to play mode help!

i am building a camera rotation script like in fps. Everything is setup and working except that camera rotation resets to zero at the start of game which i dont want. This is the camera rotation i ...
0
votes
0answers
24 views

Camera rotation to match UVs of a point across different FOV

I'm looking for the formula needed to calculate the amount of camera rotation required to display a point at the same UVs across two cameras with different FOVs. I can't modify the projection matrix ...
1
vote
1answer
32 views

Taking cube from camera space to clip space, error in my math?

watching Ken Joy's Computer Graphics lectures on youtube. One thing I'm confused about is after he gets the cube from the camera space to clip space, from my calculations the cube doesn't look like ...
0
votes
0answers
15 views

Calculating the position of a third person camera from its right vector

I have a 3rd person camera, that always looks at the player from a certain distance. It updates its x and z position around the player in relation to the yaw value received from x axis mouse input. I ...
0
votes
0answers
80 views

Achieving bokeh effect in Unreal 4.23

Bokeh been removed and Gaussian been made mobile only in Unreal 4.23. Is there any way to get around this and achieve similar effects using the stripped back DOF?
1
vote
1answer
82 views

How to draw the editor's camera position in play mode Unreal?

The blue camera that is drawn for the CameraComponent in the editor. My intended usage is that when playing a third person template, ejecting from the pawn and then selecting it, will show the Camera ...
1
vote
1answer
47 views

Camera Transition between 2 position / rotation, and follow a 3rd target

I have setup a transition of camera between 2 transform, here the result in video: https://youtu.be/rcwQ6KuEfMw I have the information of the 2 transform: - position (vector3) - rotation (Quaternion) ...
0
votes
1answer
24 views

Libgdx: converting between two camera coordinates

I had a similar issue to the question here: Why is my text is too large even when scaled to .05f in libGDX? So I created a second camera for my text elements. I'm rendering the text above some other ...
6
votes
0answers
180 views

How to set the camera projectionmatrix so that it's 4 rays always exactly hit the corners of a defined plane?

I have a camera, and I have a plane. The plane has 4 corner points. I need to find out how to change the projection-matrix of the camera so that the projection-rays of the camera always hit the ...
2
votes
0answers
921 views

Unity LWRP alternatives for camera stacking

I am working on upgrading a project in unity from a 2018 version to the latest 2019. One of the mechanics of the game is an AR (augmented reality) system. Some of the UI elements appear in the 3D ...
1
vote
1answer
40 views

Is there a way to change displays in unity

I was wondering if I could change displays in Unity by hitting a key. For example, I want to look down on the battle, so I hit 1. Then I want to see it from the side. I hit 2, etc. Is that ...
1
vote
1answer
175 views

Unity 2019 depth-only camera now overwrites everything

We have a pretty traditional camera stacking set up: UI camera on top of a everything-else camera. The UI camera is set to only clear depth, and only draws the UI layer. The everything-else camera ...
0
votes
2answers
45 views

How can I calculate all the tiles visible to a camera in 2D?

I am creating a basic tile-based 2D game ~mostly from scratch in Java, however all I need is pseudo-code for how this could be achieved.  My problem lies in the fact that my world (stored in ...
0
votes
2answers
48 views

How to limit camera pitch (x rotation) between two angles

I use this script rotate the camera on its local X axis: float v = verticalSpeed * Input.GetAxis("Mouse Y"); transform.Rotate(-v, 0, 0); Right now this lets ...
0
votes
0answers
19 views

Unity Model causes screen to go black

So ive been having this problem for a while and i have no idea whats causing it or how to fix it. Some objects in my scene causes my camera when looked at to turn black as you can see from the gif i ...
0
votes
0answers
21 views

Make camera crop scene instead of scale/stretch it

I am trying to find a way to stop unity from scaling/stretching my pixel art game as I resize my window. What I want it to do instead is just crop the scene and not change the scale of my pixels so ...
1
vote
1answer
24 views

Extending the camera vs CameraHelper class vs camera field

I am following an eBook called "Learning Libgdx Game Development" In it, the author implements a CameraHelper class that implements ...
0
votes
1answer
29 views

Can't correct perspective of Main Camera in Unity 3D without losing field of view

I have been trying to create a space based rails shooter game following a particular online course and I find a tilt(roll) on my spaceship as I move it towards the left and right ends of the screen. ...
2
votes
1answer
157 views

How to preserve Arcball rotation in c++ OpenGL?

Firts of all want to say that I've already searched for other people's answers here as same as Google and didn't found anything about it there. Also tried some others arcball implementations but none ...
0
votes
1answer
88 views

How can I take screenshots with two cameras simultaneously in Unity?

I am trying to capture different parts of a scene created in Unity. I have two cameras capturing different parts of the scene. Now, I need to take screenshots using these two cameras simultaneously. ...
0
votes
0answers
82 views

Problem with Cinemachine Collider during occlusion

I have a Cinemachine Free Look camera that is using a Cinemachine Collider with the strategy of pulling the camera forward. After occlusion it looks like the camera relocates in front of the object ...
1
vote
1answer
50 views

How can I make my camera follow the player movement in a different position

Basically my camera follows the character rotation and position, although the position of it its pretty uncomfortable to use, this is what I needed: But this is what the I get: I used a code that ...