Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [camera]

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

0
votes
1answer
10 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 ...
0
votes
1answer
31 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
35 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
36 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
31 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
29 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
21 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
34 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
21 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
15 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
18 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 ...
-1
votes
0answers
22 views

Keeping a Third Person Camera at a fixed distance - DirectX 11

I'm attempted to create a third person camera which will rotate around the player as I move the mouse left and right. I've worked out a right vector to move the camera along by which should change as ...
0
votes
2answers
60 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
42 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
58 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
59 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 ...
1
vote
0answers
18 views

Fitting Gameobjects within camera view

I am trying to fit a grid of gameobject into the orthographic view but I have a problem whenever I change the amount of grids to display it would overlap the view. What cαn I do to fit a series of ...
0
votes
1answer
48 views

Move camera while dragging with mouse

I'm currently trying to implement a move-to-drag behaviour in a 2d grid based game. I want to update the camera such that if follows the "head" of the trail being drawn - In this case, the nodes it is ...
-1
votes
0answers
23 views

Vuforia On Unity3D: Usage of Camera Focus modes?

I'm fidgeting with AR a bit, and reading through Vuforia's documentation I've found about the Camera Focus Modes. I'm using a DSLR through SparkoCam to do some tests, and have found that using this ...
1
vote
1answer
33 views

How to get a camera's frustum information?

I have a local coordinate system with three camera normalised directions, D, U and R. I ...
0
votes
1answer
32 views

Unity camera has no preview, and is not moving

I have set up a camera in 2D mode. There is only one camera named "Main Camera", and it is set to "MainCamera" (tag). In console I can see camera's transform position updating, but it isn't moving. ...
0
votes
1answer
56 views

Camera Movement - Snap Camera back to origin in relation to the player object

I am trying to implement camera movement like it is done in Guild Wars 2. Scenario is when A and D keys are pressed, the player rotates right / left and the camera follows and stays behind the ...
0
votes
1answer
34 views

Keeping 2 objects within cameras view

I have two object to control and I wanted to keep them at cameras view without adjusting the cameras size but the camera can move only in positive y-axis meaning ones it goes up it shouldn't move down ...
0
votes
1answer
54 views

How can I recreate the camera used in Swordigo game?

What sort of camera does the Android game (2.5D) Swordigo uses? Is it an orthogrpahic camera? I think it is an angled orthographic projection. How can I recreate that sort of camera in Unity?
1
vote
1answer
95 views

3D Perspective issues

My team is currently developing a 3D Sidescroller game and we encountered some issues regarding the whole in-game perspective of the levels. The levels are composed of 3D modeled corridors which are ...
0
votes
1answer
52 views

Transforming 2D viewport coordinates after scaling the viewport (zoom in/out)

I've been getting started with personal experimentation and have been working on a project for a few days now using SDL2. It is a 2D game, and at this stage I have it rendering game objects in a fixed-...
0
votes
0answers
9 views

Appropriate camera-leap motion controller coordinates to stabilize hands

i'm using the leap motion example scene provided with the sdk (capsule hands-Desktop) but the hands are jittery and unstable and they often disappear from the view suddenly. I was wondering if there's ...
0
votes
1answer
26 views

How to persist Unity camera values changed while running/paused

I have a Unity program where all the GameObjects are created programmatically in C#, so there's nothing to see in the Scene window unless I hit play. I can hit pause and change the settings for a ...
0
votes
1answer
128 views

Minecraft/OpenGL - Create Multiple viewports

I'm working on a project for the game and i have been trying to draw a second smaller "window" that would act like a second camera, independent from the player. I have looked into glViewport however ...
1
vote
1answer
28 views

How to apply fast & slow camera transition

I know there is a lerp function there that smoothens the camera but I wanted it to work the other way around. Lets say starting position of the player is at the left side of the camera/screen and when ...
0
votes
1answer
172 views

unity 3d mouselook script help, weird issue

I'm coming back to Unity after a year or two of busy college and I'm having to relearn everything I've forgotten. One thing I cant seem to get right is this basic mouselook script I wrote. Here is the ...
0
votes
1answer
64 views

Can I position a player avatar behind the camera based on rotation?

I'm currently reverse engineering a video game where what's rendered on the screen depends on the proximity of the player avatar to the camera. As such, for my freecam to work properly, I need to ...
0
votes
0answers
99 views

How to completely stop the camera from clipping into the ground

Hi I'm trying to do a basic Camera Collision in unity, for convenience, here's the entire script (I actually got most of it from someone else who wrote the comments, if that's necessary to know): ///...
2
votes
0answers
54 views

Camera that follows a target with sub-pixel movement

As the title says, I have a character that moves at sub pixel movement (no, I can't change this, because this sub pixel movement happens when I normalize the vector during diagonal movements, ...
0
votes
0answers
68 views

Rule to change orthographic size to fit object inside camera rect

I'm working on a 2D zoom effect using an orthographic camera. So far I have a zoom value that I'm using but I would like to know if there's a rule or formula to obtain the exact size for my ...
2
votes
2answers
201 views

Moving a camera without rolling (tumble not arcball rotation)

I'm trying to move my camera around using mouse+keyboard. I'm looking for specific camera behaviour however, and I cant figure out how to get it right. What I've found, is that to get a maya/tumble ...
0
votes
3answers
55 views

Using Lerp to zoom in on an object inside an if statement

I'm trying to zoom in on an object once the raycast hits it in the Update method, I am using the Lerp method to make the camera movement smoother but it's not working properly. The object only lerps ...
0
votes
1answer
194 views

GLFW - Camera rotation system

I need to make a camera rotation system similar to the one here http://madebyevan.com/webgl-path-tracing/ To rotate, press the Left mouse button and drag. So far I figured a basic idea of how this ...
0
votes
1answer
179 views

How to remove horizontal black bar at the bottom of the game screen in libgdx?

Here is the screenshot .Here is my Play constructor in Play class.
0
votes
0answers
42 views

Camera zoom to point in Monogame

I'm currently working on a 2d isometric tile-based game with a camera and the functionality to zoom in and out. So far I'll take the center of the screen as "zoom point" using the following lines of ...
0
votes
2answers
55 views

Why is the Tilemap not fitting the screen?

I have a background image which I made it in tiled map editor of width 40tiles and height of 8tiles.When I run the game the tilemap bounces with the player and I can see the black portion of the ...
3
votes
2answers
146 views

How to make the camera follow the player in Libgdx?

In Play class I have the viewport of game height=320 and game width=240unitswith camera cam. I have set the camera(cam) viewport width to 10 and viewport height to 7.I have another camera hud whose ...
1
vote
1answer
38 views

My Canvas has an image which I am using for my background but it is blocking my Camera from seeing my Game Scene

So I am not entirely sure how to explain this as I have not had any luck searching online and I'm sure this is a simple problem but I'm being stupid and can't see it. I have a Canvas which is for my ...
1
vote
1answer
98 views

Follow Player which moves over a sphere

After hours of googling and pulling several hairs out, I decided to open this thread. I want to make a game, in which the player walks around a sphere (like super Mario galaxy) and the camera should ...
0
votes
0answers
86 views

Vulkan: Unable to render using multiple view ports

I have been trying to enable multiple viewports in my Vulkan Pipeline but have been unsucsessfull. I used this code sample as a reference point. The problem is that when I attempt to draw two side by ...
3
votes
1answer
77 views

SteamVR locks position of dynamically created cameras

I'm having trouble tracking down a problem with SteamVR. Here is a quick way to set up an MWE: Create a new Unity project. Import the SteamVR package from the Asset Store. Create the following script:...
2
votes
2answers
58 views

Custom Camera View Fustrum in Unity

Is it possible in Unity to make some sort of bounding box (with a running application) within the current viewpoint of the actual screen? Let me explain: I'm working on a project which uses a ...
0
votes
0answers
22 views

GLM: Camera attached to model moves in opposite direction from the model

I have been working on a component based engine with nested game objects each with there own transformation's. Each game object calculates its position in the world based on its parents world ...
4
votes
1answer
728 views

How can the board fit the screen perfectly in Unity's 2D Roguelike tutorial?

I follow the tutorial 2D Roguelike tutorial. I want to understand how happen that 10x10 board of 32x32 sprites covers screen perfectly? Like what does this depend on?
0
votes
0answers
15 views

Performance: Culling done right- farplane and other things

I have more and more "hipoly" characters in my scene now. One way to solve this "more or less beautiful" is making a farplane and adding some fog. But the performance still is quite bad. Isnt there ...