Questions tagged [camera]

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

1
vote
1answer
28 views

Problem with making camera follow player in Javascript

So I'm testing a few things in Javascript and something I was testing was making the camera follow the player. When I move the player, instead of the dots going away from the player, they follow the ...
0
votes
1answer
18 views

GameObject keeps snapping to camera size on play

I'm in the process of making my GameObject move when I drag it across the screen using touch. But my current issue is when I press play to test the game, game object snaps to the size of my camera on ...
-1
votes
1answer
32 views

how do i clamp my camera's rotation on X and Y?

i'm using a script to make my camera rotate smoothly toward the mouse cursor on the screen. and the only thing i need is to somehow clamp it's rotation on X and Y. here : ...
0
votes
2answers
135 views

Drag 3D camera with mouse cursor

I have a camera that is moved by changing its X and Z coordinates. However, the camera is rotated, so when an object moves by 1 unit in the world, the number of pixels it moves by isn't trivial to ...
0
votes
0answers
16 views

LibGDX: Issues with two viewports, one from stage

I am frustrated.^^ I want to build a game that can run on different screen sizes using LibGDX. The best strategy for me seems to be to use a FitViewport so that I ...
1
vote
2answers
83 views

How to make TEXT RENDER stand facing the camera of my character and also for the camera of simulation?

I have an actor (Minion) with a Text Render just above it mesh: As you have seen, I defined your rotation as absolute, so the text does not rotate along with the actor. In the game the rotation ...
0
votes
1answer
38 views

UI background animation makes camera render beyond canvas, need fix?

I have a background animation for a menu where I have to make the background larger than the canvas and drag it over it. Even though I am using a panel the same size as the canvas as a mask, this ...
0
votes
1answer
33 views

smooth look at only on x and y

i'm using the script down below to make my camera look at mouse x and y position, and it has a limitation for my camera rotation.the problem is the way my camera rotates is not smooth at all.is there ...
0
votes
1answer
20 views

The camera goes up and down when following a rolling sphere

I have this CameraController script attached to my camera, to follow a sphere that moves using WSAD. public class CameraController : MonoBehaviour { ...
0
votes
1answer
18 views

Unity - Top Down Perspective Camera to Orthographic size

I have a perspective camera with an fov of 60. It looks at an object from top view with a rotation(90, 0, 0) and position (0, 50, 0) The user has the option to change the camera to orthographic view ...
0
votes
1answer
30 views

Rigidbody character rotation

How could I rotate my character that I'm using a rigidbody to move. I tried using transform.eulerAngles and changing those but the camera feels very jittery.
1
vote
1answer
25 views

Should I use a FOV slider or fixed camera fov?

I'm making a single-player third person 3D adventure game, and I was wondering if I should fix the camera's FOV, or if I should create an in-game slider to change it. If I should create a slider, what ...
0
votes
0answers
21 views

libGDX - Zooming on a specific point in 2D space

I was hoping to modify my game so zooming would focus on a point: the mouse location on desktop or the midpoint between two fingers on mobile. This appears to require a simultaneous zoom and translate....
0
votes
0answers
36 views

Scene dark when perspective camera is far from scenery

I can't find anything about this subject in the docs or forums to know if this is normal behavior: There seems to be a direct correlation between how close to the scenery my camera gets and how ...
-1
votes
1answer
70 views

How can I change position of camera?

I'm working on 3D game, where the player needs to complete 4 play fields called "homes" in level 1, then progress to level 2 which has 4 homes of its own. In level 1, when the player completes the ...
1
vote
1answer
44 views

Testing a Client's Camera in a Multiplayer FPS

I'm attempting to do a logic test regarding a client's camera in a multiplayer FPS in Unity and I'm a little uncertain of which way to implement the functionality. The scenario: - I have a host and ...
0
votes
0answers
16 views

Problem with camera deapth culling only option and objects in front of each other

I have a prefab with 2 cameras. the 1st is rendering the world, the 2nd one all the suff in front of the 1st person characters "face". Now i have a problem with a gun using a muzzleflash - both on the ...
0
votes
0answers
11 views

Unity MainCamera won't rotate

I'm making a player-script/FPS in unity where you walk around with WASD and rotate the camera with mouse x/y axis. The "character"/"Player" should be able to rotate with the mouse X axis. (E.g If you ...
0
votes
1answer
46 views

How can I find the opposite angle and position of the camera?

In this project I have a character and a camera that follows it. The camera has a position relative to the character that was defined as (x = 0, y = 0, z = 0) and also its rotation: I found a value ...
0
votes
1answer
30 views

If my camera does not change position but rotates, Does adding lerp do anything?

If my camera does not change position but rotates, Does lerp do anything? ...
0
votes
0answers
6 views

How to resize Unity Cinemachine Dolly track?

I recently imported a 1:1 scale building .obj model into unity and I'm trying too use cinemachine dolly track to navigate the interior of the building. The problem is that the visual of the dolly ...
0
votes
1answer
26 views

Unity - adding camera constraint 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 ...
0
votes
0answers
16 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
21 views

Face culling all faces that cannot be seen [duplicate]

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
31 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
13 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....
1
vote
2answers
59 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
13 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 ...
-1
votes
1answer
53 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
23 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
38 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
18 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
43 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
41 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
19 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
79 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
67 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
35 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
24 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
59 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
61 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
31 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
76 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
32 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
175 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
16 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
29 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
60 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
195 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 ...