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
1
vote
0answers
7 views

How to get world coordinates from a 4X4 camera matrix

I have Intel T265 camera which has a camera coordinates system like following diagram: The camera system has two cameras and the center of the two cameras is the position of the camera system. The ...
0
votes
1answer
22 views

Camera doesnt track player properly on different resolution

Hello i have 2d mobile game where camera follow players car, on my mobile phone with resolution 2960x1440 everything works fine but when i start the game on tablet with resolution 2160x1620 the camera ...
0
votes
0answers
26 views

Unity Light Bug

I saw this while testing my game. I have a light situated behind the Main Camera. All is working perfect, until I get a Game Over, and changes to the Game Over scene. From then, all lights have no ...
1
vote
1answer
38 views

Creating a custom camera in Godot

Allow me to start with what I'm trying to achieve - there might be an easier way to do this and I'm just overcomplicating things. I'm trying to implement a camera, that will be able to rotate around a ...
1
vote
0answers
29 views

Rotating around pivot so target is 25% away from top of screen

I have a camera which rotates around a pivot (green dot) that is always a constant X units away from that pivot. I want to find the pitch to rotate around that green dot so that the target (red square)...
2
votes
1answer
47 views

Drawing OpenGL camera frustum

I am trying to display camera frustum in my OpenGL application. I calculate the vertices of the frustum pyramid using reverse projection from screen space to world space. The camera uses perspective ...
0
votes
1answer
123 views

Why are clipping planes… plane?

A frustum is used to clip geometry, deciding which parts of it are visible. It seems that most cameras use a frustum shaped as a pyramid segment, i.e. a box between two rects of equal alignment on ...
0
votes
0answers
22 views

How to add level-by-level game camera following in 2D java game?

I've been working on my first game recently, and I've built a player tracking camera that works great, but my goal for the game would be to have a camera that is fixed for each area that the player ...
1
vote
1answer
35 views

How do I make 2D Camera Matrix with zoom?

I trying to understand how to make a 2D Camera Matrix. The problem now is when I zoom the world shifts horizontally. The Camera need to zoom on the current Position. ...
0
votes
0answers
10 views

How to dynamically create unique layerMasks and assign it to the player

My goal here is that each player that joins the game will get a unique layer for their player, that way I can set the first person camera's culling mask to only exclude their own body from rendering, ...
1
vote
1answer
24 views

Having issues with 3rd-person Camera Raycasting / Local<->World Space / Clipping

I would like my camera to inherit the player in the hierarchy, and get closer when there is a wall or floor between the player and the camera. Right now I am trying to raycast from the player to the ...
0
votes
0answers
16 views

How to ensure that a randomly-generated velocity vector moves the camera forward within a valid arc?

I spawn a camera in a scene using random coordinates for x and y and setting z=0 and orient ...
1
vote
0answers
27 views

limit orthogonal camera movement to the positive axis(x,z)

What I'm trying to achieve is limiting the orthogonal camera movement to the positive axis(x,z) , so the camera clamp/stop moving to the negative axis. The problem is I can' find any property or ...
0
votes
0answers
33 views

position locking and smooth lerping side scroller camera follows the player with jittering delay

I've seen this question: How to smoothly move camera when the player is climbing a diagonal staircase in 2D tile-based side-scroller? And here's my code: ...
0
votes
1answer
29 views

How to enable anti-aliasing when camera zoom in libgdx

I develop a game where I draw some textures on the screen and want to zoom in and out the scene. I am using OrthographicCamera and when I zoom in, the textures ...
2
votes
1answer
133 views

Godot label Attached to 3D object gets larger when moving away from the object

I have a scene that consists of a CSGBox and a Label as a child of it. In the script for the ...
1
vote
2answers
24 views

Orthogonal Camera Clip/Hide part of 3D model

How to prevent the Camera from Clipping/Hiding part of the 3D Model/Object? I tried playing around with ...
3
votes
1answer
80 views

How to make a custom 3d view cone that mixes orthographic and perspective cameras

I'm trying to make a camera that displays objects the same height no matter the distance, but still changes width relative to distance. Similar to having an orthographic view vertically and a ...
0
votes
0answers
40 views

LibGDX getting model roll

I'm working on a 3d game in LibGDX, got help on here with my model rotation. Worked great. But now I'm dealing with the model's roll, and it's not behaving as expected. It's controlled by: ...
0
votes
0answers
32 views

Calculating size and position of Tilemap for camera bounds

I'm new to Unity and I'm following a series of tutorials covering off building a 2D Zelda-like game. I'm at a stage where I have two Tilemaps side by side and I'm working on a transition between them, ...
1
vote
1answer
25 views

LibGDX setToRotation canceling out position

I'm working on a 3d project in Libgdx. I've got a camera flying around in 3d space, being controlled with touch. Works great, moves forward and backward, strafes, full 360 look around with no gimbal ...
1
vote
0answers
26 views

About the cameras in the original Metal Gear Solid for PSX [closed]

Since I first played MGS on the PSX I have been wondering about this. To my understanding, MGS loads the geometry of the 'room' where you are and lets you move through it by using semi-fixed cameras ...
1
vote
1answer
76 views

how to center 3d camera vertically and horizontally

How to center the player/camera in the middle of the window/screen , to mimic a 2.5d camera, ...
0
votes
0answers
16 views

Show Camera Inside Object Bounds

I'm making a mobile game, and I want have secondary camera that shows another part of the scene within a box. I'm able to do this easily enough by setting the camera's viewport settings, but the issue ...
0
votes
0answers
23 views

How to set camera coordinates without making a Camera class?

Recently, I have been making a 3D game (and asking alot of questions about it), and yet again, I've run into another problem. I'm trying to rotate a cube across the "camera" origin, which is ...
1
vote
1answer
21 views

How to make sound fx follow the player?

Here is the setup: > KinematicBody2D (Player) - > Camera2D - > Node2D (SoundFX) - - > Timer (1 sec) - - > AudioStreamPlayer2D (Beep) It works fine ...
0
votes
0answers
19 views

Get direction vector of camera in voxel game

I am currently working on a Minecraft clone (a voxel game). The feature I'm working on is the ability to break blocks. I have a ray-casting/ray tracing algorithm for traversing the voxels, but the ...
0
votes
0answers
24 views

Godot Camera shake without target

I'm working with godot 3.2 to make this screen shake, but my issue is that i don't have a target, like in the example, in the example code, it's a kinematic body that is being followed by the camera, ...
0
votes
1answer
236 views

How can I limit the y-rotation of a cinemachine POV camera based on the player's direction?

I'm using Unity (2019.4.11.f1, HDRP). My goal is to create a first-person POV camera. To this purpose, I tied a Cinemachine (2.7.3) Virtual Camera to the head of a third person player character (one ...
0
votes
1answer
20 views

How to handle player slowness while moving up and down in a Top Down game with angled ortho camera and angled sprite due to stretching of ground?

So i'm making a 2D top down game setup in 3D using tilted Sprites and angled orthographic camera. My camera setup is as shown. In my game I have the floor flat on the X/Z plane with walls/characters ...
0
votes
1answer
75 views

How can I set up a 3D camera for a top-down game like Enter the Gungeon?

DodgeRollGames, the developers of Enter the Gungeon, tweeted that the game was in fact made in 3D They tried to explain how they set their camera in this reddit post. Basically what they said was : ...
1
vote
2answers
78 views

Free movement in a 3D isometric world

I'm currently experimenting with movement in a isometric perspective world and i'm thinking about how the movement should work. The movement can be either by WASD or gamepad. Since the player can ...
0
votes
0answers
7 views

Retain Position and Scale Values of Render Texture Canvas Elements to another Canvas

Now the title might not be able to express the entirety of the question but here's my problem. In my main scene I have a camera and a canvas in overlay mode, let's call this "View A". In ...
0
votes
1answer
21 views

How does time-dependent camera rotation with a mouse work?

The commonly used equation for camera rotation with a mouse does not involve time. This make sense since higher frame rates have smaller changes in mouse position and vise-versa so it all evens out. ...
0
votes
0answers
39 views

Masking cameras for Voronoi splitscreen

I would like to mask a camera to only render to a certain (non-square) region of the screen, to be used as an overlay, for splitscreen, or any other application. The goal is obviously to prevent any ...
0
votes
1answer
45 views

SpriteKit prevent camera going out of bounds

I've been working on a Mario Bros clone for the first level, trying to learn how to make games with SpriteKit I'm trying to use an ...
3
votes
1answer
70 views

Is it possible to record video, depth map and 6D pose of any games?

I'm not a game developer, but a researcher working on improving video quality in various contexts. For my current problem, I need to collect videos which have both RGB data as well as depth data. ...
0
votes
0answers
20 views

Handling real projectiles with different FOVs on a first person shooter camera stack

I'm prototyping out a First Person Shooter and I'll admit I have little work experience in the genre (though I've played many of them). I'm using a traditional weapon camera stack in which the main ...
1
vote
1answer
85 views

How can I hide the camera gizmo in Unity?

How can I hide the camera gizmo in Unity? As said here I tried to use the gismos menu in the top of my Scene view. But it does not work. Why? Also, I tried saving my scene and project after the gizmo ...
1
vote
1answer
79 views

How to convert screen space to world space?

I have a shader that should do raymarching. But I have problems converting the fragment's position to a worldspace coordinate. This is my vertex shader: ...
0
votes
1answer
64 views

What is the proper way to create a camera matrix?

I am having issues when trying to create a camera transform. It seems to have odd distortions and it does not seem to rotate properly, though it will translate alright. While I have seen issues like ...
0
votes
1answer
111 views

Render texture seems to ignore camera background type

I'm currently trying to pull a fog of war for an rts game, and planned it like this. (Unity 2020.2.7, URP 10.3.1) Use units field of view to generate a texture of what is seen (alpha 0). Create other ...
0
votes
1answer
126 views

Lerp performance for camera movement

In my current script responsible for camera movement, I use Mathf.Lerp to smoothly move the camera to the desired position (with WASD movement, panning with MMB, ...
0
votes
1answer
38 views

Correct way to set up camera buffer [DirectX]

I would like to play with two different implementation of particle system in my project (ok, actually not mine, but I am working on it). I copied the particle system successfully, however, faced the ...
0
votes
1answer
79 views

Press and hold camera movement with mouse in new Input System?

I am transitioning to the new movement system and am having trouble figuring out how to move the camera when a mouse button is pressed and held. Here's how I did it before: ...
0
votes
1answer
49 views

How to apply Time.timeScale only to certain scripts?

I have a need to pause my game and the simplest and most clean way that I know of (other than completely designing my own time system) is by using ...
0
votes
0answers
19 views

LibGDX TiledMap Rendering

For the life of me I cannot figure out why these lines keep appearing on my rendered tiled map. Every time I resize my libgdx window, the tiled map creates lines all across the screen. I have adjusted ...
0
votes
0answers
19 views

Terrain does not show up in distance in play mode, but does in editor

I'm trying to make a big landscape with high mountains but the terrain doesn't show in the distance in play mode. Which settings should I change, or what can I do? My terrain is divided in many pieces ...
0
votes
0answers
10 views

Camera field of view for far objects

Dears, I am building a flight simulator game with third person camera. I facing a problem that when I go high with the plane, objects, land and farms didn't look very far. I tried to change the field ...
0
votes
2answers
48 views

Main Camera re-sizing in 2d

My UI : An UI from YouTube video : Look my camera's size is 10 and his camera's size is only 5. But, my camera's width is larger than height. If you look at scale (x,y,z)=(1,1,1). I tried to change ...

1
2 3 4 5
23