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.

0
votes
0answers
6 views

Unity - adding camera contraint to prevent the player from seeing beyond the scene

Like the title says, I'm after some kind of constraint for the camera to prevent the player from seeing beyond the scene and seeing the Skybox. I came across the code to add a Mathf.Clamp, but I can't ...
0
votes
0answers
9 views

Joystick Orientation Wrong After Camera Rotation

I am using a virtual joystick to move & rotate the player and a touch swipe system for the camera rotation, The problem is that when I rotate the camera (Let's say I rotated the camera to 45 ...
0
votes
1answer
17 views

Face culling all faces that cannot be seen

I'm working on a simple 3d game using the Processing Java environment. I want to optimise my code so I can draw many many 'objects' (the world is made up of many different shaped objects that live ...
0
votes
0answers
24 views

Java game how to fix offset move with mouse drag and reset back to start position

I'm try to make offset x and offset y move correspond with mouse drag movement I tested it. Its work but after I released the mouse and do it again the offset will reset to 0, 0 I tried to fix it by ...
0
votes
0answers
9 views

Shader to Show outline, and transparent backFace

I would like to implement in my game some sort of occlusion for backward wall. I want, when my camera is inside a wall, to be able to "see" the start of the wall, with a transparency effect or watever....
0
votes
1answer
31 views

Static Camera on Endless Runner

I am developing a mobile game in ue4. For this project, I need to have a "static" camera so that the player can move within the frame not affecting camera location and rotation. But as this is an ...
0
votes
1answer
10 views

Culling mask don't work

I have the following setup: MainCamera render everything except ImageTurret layer. TurretCamera render only ImageTurret layer on a RawImage My problem is: MainCamera render everything and ...
0
votes
1answer
38 views

What is the alternative (new) 3d projection called that solves the stretching / zooming at sides of monitor?

I understand about camera's and projections etc, such that we have distortion and zooming when at the sides of the screen (exacerbated on 21:9 monitors), however a few years ago, in a Unity forum ...
0
votes
1answer
11 views

What is causing my 3rd person camera to lose rotation on the z axis?

I've been working on a 3rd person camera on unity for a couple weeks, but I've pretty much hit a wall, specifically to do with my camera's rotation. When I rotate it on its x and y axis it won't have ...
1
vote
1answer
27 views

Camera that pivots in the direction that the player is moving

I'm trying to recreate Rocket League's freeform (non ball-locked) camera, which basically is a camera that follows the player but pivots to allows face the direction the player is moving in (not ...
1
vote
1answer
10 views

How can I use pan gestures to zoom a camera in and out

I have the following scene tree for my player: They have a Camera2D as a child, which has a script attached to it. How can I make the camera zoom in and out as I ...
3
votes
1answer
38 views

Making the camera look at the player while keeping another object in view

I'm working on a sorta football game where I need my player to always be at the center of the camera view while keeping the ball into view, without any vertical movement. The idea would be for the ...
0
votes
1answer
38 views

How can I use slerp to stop my orbit camera “shortcutting” across to its target position?

I'm working on a camera that moves around the player at a fixed distance. It's the standard right-stick-to-move-cam-around kind. The camera follows the player but stays at a fixed angle to (0,0,1) ...
0
votes
0answers
18 views

Why use a quad background over a camera background

I'm quite new to Unity and after looking at a few tutorials for 2D games, I'm noticing people tend to use a Quad for their background colour. What is the benefit of this over just changing the ...
0
votes
1answer
52 views

Pixel Perfect 2D tiles

I'm trying to make an 64x64 tilemap using Super Tilemap Editor & Unity but my tiles looks terrible. I did my research about pixel perfect 2D and all of the solutions were for pixel art, they didn'...
0
votes
0answers
53 views

Why is Unity MouseLook very shaky and jittery?

I'm working on a first person shooter game. My problem is that my Mouselook script is shaky and jittery when I looking around. Here is my code: ...
1
vote
1answer
28 views

Unity2d Camara smooth zoom issue

want to know that how mathf.movetowards works, i tried to play around it and have some issues. i want to make the camera moves from player to target places along with zooming upon triggered and vise ...
0
votes
0answers
21 views

Unity Touch Pan Orthographic camera

I have written some code to pan in perspective view. I used that code and modified it to make it work in orthographic view. However, the display does not pan as expected. It just goes all over the ...
1
vote
1answer
38 views

Video feedback effect with recursive RenderTextures in Unity 2018.3

I have a project where I'm playing with a video feedback effect by rendering a camera to a RenderTexture and pointing the camera at a quad displaying that RenderTexture. This works great normally, ...
0
votes
1answer
60 views

Changing the camera in Unity

I am trying to make a game like Mario Party in Unity. I want the camera to automatically change between players after each turn. I don't have a lot of experience in C#, and I totally would learn ...
1
vote
1answer
21 views

Spine + MonoGame > viewMatrix / camera offset

we switched from frame by frame animations to Spine (this animation software). The issue I am facing now, that it am unable to fit it in our coordinate system. (simple 2D game) I guess there is an ...
0
votes
1answer
41 views

How to set ortho projection / model view matrix without a camera?

I'm trying to create the correct projection and model view matrix for rendering without a camera. _orthoCamera is a camera I set up in the scene view. Using the <...
1
vote
0answers
26 views

How to make only-head rotation in UE4?

I've made a character, attached a camera to it and setted input. But now i want only character's head to rotate with mouse, but not a whole character (player capsule rotates with Q and E keys). I ...
0
votes
1answer
19 views

MouseLook Script “Pops” back to the last value when the script is enabled after being disabled or destroyed

I am trying to get a problem with a MouseLook script that controls my camera and a LookatGameObject script that also controls my camera when I want to force the player to look in a certain direction ...
0
votes
1answer
79 views

Camera view matrix from position/yaw/pitch/worldUp

I'm trying to make a basic FPS camera view matrix, using position, pitch/yaw, and worldUp. Currently, my camera's view matrix is just a plain rotation matrix (made with yaw/pitch/roll) and the result ...
0
votes
0answers
14 views

Character sprite breaks after adding viewport

I am developing a game within gamemaker studio 2, a small RPG style game and I want it so that the camera follows the character as with a lot of similar games. When I run the game from the .exe file,...
0
votes
1answer
27 views

Vertical camera rotation has reduced speed & range when looking at the character from the left or right

I completed a camera tutorial for Unity. I can rotate a camera around my figure around the Y axis (Vector3.up) and I wanted to extend that for a Fixed-Free 3rd Person camera (What are the types of 3rd-...
-1
votes
1answer
59 views

How is this camera settling done?

For clarification: I don't need to know how to rotate the camera. What I'm asking instead is how the movement of the camera AFTER the mouse move is calculated (the "slow fade out"). I've tried a lot, ...
0
votes
2answers
134 views

My camera does not rotate around player in 3d open world

I want my camera to following behind the player at all times. When the player turns to the left, I would expect the camera would move behind the player while remaining focused on the player. My ...
0
votes
1answer
77 views

Alternatives to Camera.main.ScreenToWorldPoint in Unity

What are alternatives to Camera.main.ScreenToWorldPoint in Unity? So, here is my code (just the piece which is relevant for the question): ...
0
votes
0answers
26 views

Camera LookAt position with fixed screen position

I have a perspective "lookAt-type" camera. I'm trying to compute specific focus point of the camera, which should be placed in the middle of the screen: I also have a custom 3d point in world space, ...
0
votes
0answers
39 views

How to get frustum coordinates of a scene capture / camera at a given focal distance?

Is there a way to get the bounds / frustum coordinates of a UE4 scenecap2d at a given focal distance? I'm not seeing a way of getting either 6 vectors for the frustum volume coordinates or 4 vectors ...
2
votes
1answer
67 views

How do I render a cylindrical world space onto a flat, 2D view port in Unity?

The question is just a logical extension of this question. So, how should I render a cylindrical world space onto a flat, 2D view port in Unity? Thank you.
0
votes
2answers
48 views

FoV value scaling

I'm creating an FPS project in Unity 2018. My reference FoV is 90. Let's say I'd like to create an sniper rifle which let player change FoV to 60 when he's aiming with optics. But what should be the ...
3
votes
1answer
93 views

Wraparound world with wraparound horizontally physics implementation in Unity

What is the best way to implement a wraparound world with wraparound horizontally physics in Unity? That means that if I have an object and move it so that a part of it sticks off to right (so that ...
0
votes
1answer
17 views

Transfer mouse movements to a GameObject in 3D according to camera position and rotation

I'd like the game object to follow the mouse but I have trouble doing this when the object is in 3D and the camera has been rotated. The only thing that seems to be true (and still it works only when ...
1
vote
1answer
145 views

Scale camera to fit screen size unity

My background and gameobjects are 2d sprites not UI images ,I want to know how to make my background scale with screen size and positions of 2d sprits on it don't change after building game (webGl) ...
0
votes
1answer
50 views

Images disappear when camera zooms in

there is no problem when the camera is away, but as I zoom in to the game, the images disappear and I can't see the game properly. What is the reason ? enter image description here
1
vote
0answers
60 views

How can I avoid jitter when working with a 2D movement system?

How can I avoid jitter in Unity? Let's suppose that I want to create a 2D movement system using a Rigidbody 2D(Dynamic), and I want make the camera follow the character (which is a pixel art sprite)....
1
vote
1answer
43 views

Camera to the right from the character

I'm trying to create a camera like in Fortnite or Gears of War. It's focus must be to the right side from the character: But when I rotate the camera, the character slightly shivers. Lerping and ...
0
votes
0answers
60 views

Isometric character from 3D blender model

I am trying to make a character for an isometric game from a 3D model in Blender. I managed to create a simple humanoid model and implement an isometric camera, rotated by 60° on the x-axis and 45° on ...
0
votes
1answer
25 views

Interpreting focal length in units of pixels

I am working on a renderer of sorts and I have some fundamental questions. Let's say I have a vector in a 3D virtual world space which is unitless, and I want to project it onto a 2D screen, so I need ...
0
votes
1answer
47 views

Scrolling in 3d Shmup with 32Bit era effects

How can I create a scrolling effect like in Ikaruga, where the background is on Rails and the foreground is fixed with the player in Unity? https://www.youtube.com/watch?v=H6d0PkEPKSk Some more ...
0
votes
1answer
87 views

Order of rotation in Euler angles

I'm want to control the direction my camera looks, so I'm using Euler angles, so rotating around an axis is relative to rotation around previous axis. Something like this. I want to always rotate ...
0
votes
1answer
58 views

Unity | Camera - Follow target with view port point's offset from center

Some additional remarks before I address the issue: How Viewports work in Unity: Whatever the dimensions of the screen's rect, the viewports coordinates are mapped in normalized coordinates, where 0 ...
0
votes
1answer
24 views

Why is Camera turning with different speed than Player with same code in different scripts? (with unity)

I want to integrate a running character in my game, so I downloaded the animation via Mixamo. The player is running and if I attach the camera directly to the Player it's shaking the camera and the ...
0
votes
2answers
67 views

How to panning camera on XZ axis with different angles

I have an Orthographic camera where the position is { x:0, y:100, z:0 } and is pointing/looking at { x:0, y:0, z:0 }. At this ...
1
vote
1answer
77 views

Problem with rotation a camera with the mouse OPENGL GLFW

I am trying to move my camera with my mouse, I can translate it juste by changing the current position of my camera, but when I want to move my forward vector and my up vector of my camera it doesnt ...
1
vote
1answer
64 views

How can I make a two-eye-view effect using two cameras?

I have two cameras. The second was made by duplicating the first. Then I changed both cameras' viewport rects: First Camera X = 0 Y = 0.25 W = 0.5 H = 0.5 Second ...
2
votes
4answers
75 views

How to smoothly move camera when the player is climbing a diagonal staircase in 2D tile-based side-scroller?

I am working on a game, which is tile-based, similar to the way Terraria works. My player is 2 x 3 and can move over one-high obstacles, but this creates a very jittery effect, since my camera ...