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
0answers
24 views

Tracking player on "overview map"

I'm working on a city-based isometric game where the player controls a character moving around in the city. I need to create both an overview map and a minimap similar to both GTA and Mafia 3. Here's ...
0
votes
0answers
44 views

Why does this order of Quaternion multiplication not introduce roll into my fps-style character controller?

I'm working on an OpenGL based project (in C#), employing Quaternions to rotate my camera I first tried to: ...
1
vote
0answers
27 views

Smoothly resize minimap camera rect width and height

I have an orthographic camera that is working as a mini-map. Now I want to make it resizeable using mouse drag. I have applied some UI beside my minimap camera rect and those UI resizing perfectly ...
1
vote
2answers
60 views

More natural camera movement

I have a camera that currently smoothly (ease in and out) linearly interpolates between two positions. The camera also moves in response to user input. While this movement is nice and smooth it does ...
0
votes
0answers
53 views

Unity virtual joystick - jarring movement

I'm creating an infinite flyer game in which you control the plane using a mobile joystick. There are two controls one to rotate the plane and the other to move the plane. While rotating the plane ...
0
votes
1answer
103 views

Orthographic Camera Movement inside Rotated Boundary Rectangle Weird Behaviour [Unity3d]

Basically I have an orthographic camera that is looking at a simple square. The camera is sitting above the square and tilted by x: 45° and y: 45°, so the camera sees the square as a rhombus / diamond ...
2
votes
2answers
2k views

How can I display a 3d object and my player on a canvas?

The main goal is to animate my player with animator on a canvas. The problem is that any 3d object (my player, a cube) I drag over the canvas is transparent/not seen. The main camera is set to Clear ...
0
votes
1answer
794 views

Unity Cinemachine+URP : 2D pixelPerfect zoom issue?

There are many PixelPerfect component that exists and it confuses me. The CM PixelPerfect component doesn't work in my 2D Tilebased game. So I use the Camera component named "Pixel Perfect ...
0
votes
0answers
355 views

Unity custom camera projection only working in scene editor

I've found this article on Gamasutra on a custom camera projection to make 3D look more 2D and decided to implement it to make some gameplay tests. I had to make some changes to make it work on URP(on ...
0
votes
2answers
432 views

Rotating camera in 3D without yawing diagonally

I'm programming a C raytracer. I'm having trouble getting the camera to rotate the way I intend. I would like the camera to rotate by pressing keys: F & H rotate left & right around the world'...
0
votes
1answer
106 views

How do I zoom in and out in a fully tiled based game

I am currently developing a tile based game in Java and trying to add the option of zooming. I do the zoom by reducing and enlarging the tiles, but the problem is that it creates spaces between the ...
0
votes
0answers
11 views

Unity Applying Global Light Settings fog to a non-main camera

Is it possible to apply fog to a non-main camera?
0
votes
0answers
54 views

How to purposely overscan a Unity Camera?

For many shader effects that use the scene color, we want this color to be displaced along the object plane. Think water, glass, heat distortion, etc. However, of course, if this happens near the ...
0
votes
2answers
1k views

How do I stop my player or camera from jittering during player movement?

In my game, I have a third person character. The player moves with a rigidbody and has isKinematic set off with interpolate on. In the script, it moves with ...
0
votes
0answers
14 views

World Canvas InputField cursor precision/control from RenderTexture output in Overlay UI

How do you have a world canvas input field cursor be controllable from the input being mapped from a UI overlay with its raw image supplied from render texture from a render camera? Described another ...
5
votes
1answer
160 views

What is the term for making an object transparent when it blocks the player's view?

In many games if your camera gets too close to certain objects, or the object starts to block your screen, the game turns it transparent so you can still see. What is the name for this effect? It is ...
0
votes
0answers
37 views

Unreal Engine custom camera

I was looking at game engines and found Unreal Engine. I want to make a game where the player has to create a camera by crafting it and can customize how many pixels the camera detects and what the ...
2
votes
1answer
395 views

Linear interpolation: reach moving destination regardless its speed

I'm implementing a camera for a game and I'm using the LERP formula for smooth chasing. However, if the target moves fast enough, the camera can never reach it unless the ...
1
vote
0answers
33 views

How to show part of the world scaled to screen size?

I have a world size of 100x100 I want to map this world size to screen size using this mapTo function ...
0
votes
1answer
194 views

How can I reset the mouse axes when respawning a player?

I am making a simple parkour game in which the camera will follow the mouse based on the mouse input axis * the sensitivity. This works great, but when I want to reset my character to the start I cant ...
1
vote
0answers
128 views

My arcball camera does a roll when it shouldnt be

I am trying to build an arcball camera and it's mostly working, the problem is that as you rotate around the object you have selected (orbit_target_pos in the code),...
0
votes
1answer
72 views

Camera stacking for first-person view weapon in Universal Render Pipeline

I just added URP to my project then upgraded the materials to URP and now it's not rendering the environment anymore I found the problem is that I have 2 cameras which are stacking on each other: ...
0
votes
1answer
459 views

Unity - Smooth player input direction when changing camera

Preface- I'm very new to Unity. I'm working on an exercise using fixed cameras like how they work in the PSX final fantasy games. I have the camera scripts working fine but it's an aspect of the ...
0
votes
1answer
74 views

Unity - Issue with Camera follow script

I have a camera follow script which is attached to the main camera and it follows the players position and rotation. The player needs to be near the top of the screen. However when I hit play, the ...
1
vote
2answers
544 views

3D Camera Rotation (Unwanted Roll) - Space/Flight Cam

I am working on a camera class that will have full range of motion (pitch, yaw, and roll). When only altering pitch and yaw, I am getting a large amount of roll. I understand that the issue is ...
0
votes
0answers
746 views

How do you rotate the camera using right mouse clicks with Cinemachine?

How can I rotate the camera around the player using right-click?
0
votes
0answers
26 views

How to check what part of an gameobject is seen by a camera?

Could anyone please give me a hint on how to determine how much of an object is seen by a camera. There have to be a threshold value (e.g. 30% of an object is seen). If value is below the threshold ...
0
votes
1answer
245 views

Calculate the near clip plane distance in meters from a certain object - Unity

How do you convert the near clip plane and far clip planes to position units, to be able to find out its distance to a game object?
2
votes
1answer
480 views

Calculating Directional Shadow Map using Camera Frustum

I'm trying to calculate the 8 corners of the view frustum so that I can use them to calculate the ortho projection and view matrix needed to calculate shadows based on the camera's position. Currently,...
1
vote
0answers
33 views

Drawing a deferred decal when the camera clips its bounding geometry

I have a building grid effect that I decal onto my terrain using a cube that moves to follow the cursor. You can see if the camera gets too close to the cube, it gets clipped by the camera's near ...
2
votes
1answer
1k views

How can I render 3D objects and particle systems in front of a Screen Space - Overlay Camera?

I am using Unity 2019 with the Universal Render Pipeline. I have a canvas that is using Screen Space - Overlay render mode. I cannot change my render mode to Screen Space - Camera, because it is not ...
0
votes
1answer
19 views

(While using a cube map) box-like textures appearing around my scene whenever I move the camera

I've been learning about cube map and I implemented one into my program. It seemed to work well until I started moving the camera around the scene and zooming out. As you can see in the attached gif, ...
1
vote
1answer
525 views

URP cant get Pixel Perfect Camera to work

I am currently using URP to add bloom to my particlesystems. The problem im facing is that I cant pixelate the game. I have tried to implement several methods to post pixelate (via shaders and render ...
0
votes
0answers
33 views

How can I instantiate enemies in a 2D game at a set Viewport Position before my camera enters the room? (Or alternative solution!)

I'm currently working on a 2D game where I'm trying to pre-populate my level with encounters, I want the enemies already in the room when the player enters. Right now the encounter is triggered upon ...
1
vote
1answer
409 views

How to isolate a child object from parent's movement? (Unity)

I currently have a very basic scene that includes a platform (ground), a capsule (player), and a camera rotator (main camera is mounted on it). The object hierarchy is the following. This hierarchy ...
1
vote
1answer
674 views

How to do in Godot 2D: game screen in one viewport and minimap in another. Different sprites on each

The second day I google the tutorials, but nothing comes of it. All tutorials link to splitscreen demo, but it is made under the second Godot and does not work in the third. The problem is this: I ...
1
vote
1answer
808 views

How to convert isometric screen space coordinates to top-down world coordinates in Unity?

I have 2d grid in a 3d world facing the world up. My camera is setup so it shows an isometric view of the grid. I want to get the player's input in screen space (cyan) and find the same point on the ...
0
votes
1answer
53 views

Moving a top-down camera while keeping its height constant

I'm currently writing the script for the player to explore the plane below. The camera view is set to be slightly rotated as to look down. And I have set the code to make the camera move. This is ...
0
votes
1answer
75 views

How do I make my level scroll side-to-side as the player moves?

I am trying to figure out how can I make a side-scrolling view in Pygame. If I am moving right or left, I want the portion of the level shown on-screen to shift to follow the player character. Here ...
0
votes
0answers
48 views

How to define a weak-perspective camera in openGL?

I know how to define the perspective camera as well as weak-perspective camera in the Math. But how to define a weak-perspective camera () in openGL?
0
votes
0answers
267 views

Unity: Dimensions of color surface does not match dimensions of depth surface

I am receiving the error, "Dimensions of color surface does not match dimensions of depth surface" whenever I attempt to use my screenshot code, without any callstack or anything further insight of ...
0
votes
1answer
65 views

Moving camera vertically only after player is too high or too low

In my 2D platformer game, I find it very exhausting for the player if the camera follows the player all the time. So, I looked up for some tricks to make camera movement feel more natural. The first ...
0
votes
1answer
48 views

How to know when the cameras change?

I'm working on a script that uses raycasting from the camera's perspective to see what the player is looking at. Pretty standard stuff. The only question is, how to reliably find the camera? ...
1
vote
0answers
482 views

Handling zooming in for a spot-the-difference game in different screen resolutions

I am creating a 2D game for Android as a school project. The objective of the game is to find differences between the top image and the bottom image. I have 1 main camera, which views the entire ...
0
votes
0answers
179 views

How can I apply a fullscreen shader on a specific layer?

How do I apply a full screen shader on one layer of objects using LWRP/URP and shader graph? I want to pixelate only my particlesystems, but nothing else. I want the effect of pixelcamera, but only on ...
1
vote
1answer
145 views

Third Person Flying Camera

I am having issues creating a third-person camera for my Rogue Squadron (N64) like game. First I have posted my issue on the official Unity Answers site here. So far my ship is behaving as I want and ...
0
votes
3answers
131 views

World rotation independent mouselook

Preface: I am terrible at using quaternions right. I wanted to create a world rotation independent mouselook script. That is, no matter the 'down' for the camera, the mouselook should feel natural to ...
0
votes
1answer
84 views

How do I create cinematic (trailer like) shots of my game?

Background We are in the midst of developing a trailer for our game. It is a 3rd person adventure platformer. As such, the camera is an over the shoulder position, which is great for gameplay, but ...
0
votes
0answers
93 views

Rigidbody appears to jitter when placed as a sibling to a First Person camera

In my game, the Player can pick up an object (which gets parented to the first-person camera), or the player can push an object (which is parented to the player, but not their first-person camera). ...
0
votes
0answers
13 views

World coordinates on vertical grid game for different aspect ratios (Unity) [duplicate]

new to game development and unity so hopefully someone can help. I want to make a 2D portrait mobile game that will have a grid of constant size where units can move on in Unity. This should support ...

1 2
3
4 5
23