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

How to achieve smooth camera dragging with the mouse in SDL2?

I am working on a 2D isometric perspective game using SDL2 and I would like to implement the ability to pan the map when the right mouse button is held down. I was wondering what is best way to set ...
lancen's user avatar
  • 31
1 vote
0 answers
29 views

Is it possible to add new waypoints to Dolly Track in Unity CinemachineVirtualCamera on the go?

I'm making a racing game "on rails" that utilizes generated map (similar to outrun). The map is made out of chunks that appear every time player crosses a Trigger area on the chunk that is 3 ...
SirResnick2's user avatar
0 votes
1 answer
39 views

Unity RB Controller Jitter on a Moving Platform

Brief Description: I have a RB based character controller that I want to move along with my Train platform (non physics based) when the player steps on it. Main Problem I manage to make the player ...
Vav Avagyan's user avatar
0 votes
0 answers
53 views

Get coordinates of clicked point on screen in model space

There is a 2D object located in the coordinate range -1 to 1. In world space, it is also located in these coordinates, but with a shift along the z axis. The actual initialization of the model, view ...
Ar4's user avatar
  • 1
2 votes
1 answer
59 views

How do I add a function to the sequence of functions which runs pre camera culling in Godot?

In unity you can do: Camera.onPreCull += OnPreCullCamera; void OnPreCullCamera(Camera3D cam){ //... } But in Godot I don't know what the equivalent is. How do you ...
Ethan's user avatar
  • 145
3 votes
0 answers
72 views

How to test for intersection of a cone with infinite camera frustum (no near/far plane)?

I have a given infinite camera frustum defined by four planes, each defined by a normal (left, right, bottom, top). From those planes we can also easily get the camera position and the view direction. ...
Lukas Kalbertodt's user avatar
0 votes
0 answers
27 views

Follow camera is not turning when the followed object turns

I need a camera follow script to chase a moving ball. I've attached the script below to my camera, but when the ball turns left and right the camera does not turn ...
Haseeb Ashraf's user avatar
1 vote
1 answer
78 views

I want to convert world coordinates into camera coordinates

In world space, I have an axis (eg. [-1, 0, 0]) and a point (eg.[2,5,1]). I also have a 4x4 viewmatrix. Now I want to transform that axis and point in camera frame. I am getting really confused. Does ...
Anmol Gupta's user avatar
0 votes
1 answer
146 views

Camera Calibration custom Model-View-Projection matrix in Unity?

Coming from this topic I have a Model-View-Projection Matrix obtained from a Camera Calibration method, from where I want to render the scene: ...
Bontempos's user avatar
0 votes
0 answers
112 views

Implementing Camera Movement and Rotation in 3D Game Engine

Apologies in advance for any mistakes on terminology, I'm really really new to this I'm completely new to 3d (and it's maths) but as a personal exercise I'm doing my own game engine that displays a ...
MiguelP's user avatar
  • 103
0 votes
1 answer
97 views

Why doesn't RectTransform.GetWorldCorners() employ any camera?

Typically, conversion methods from world to screen coordinates and vice versa use a camera to perform these calculations, so I'm wondering how does GetWorldCorners ...
Serg's user avatar
  • 363
1 vote
0 answers
50 views

How to know when should a webcam/phone camera refocus?

This is the code I use to display the camera's footage inside my app: ...
Tudvari's user avatar
  • 721
0 votes
0 answers
19 views

How to set up Unreal camera dimensions to export a book cover?

In the following image, you can see the camera settings of Unreal Engine. Suppose you have a scene. How can I setup the camera dimensions to match perfectly, and ready to export, an Amazon ebook ...
M.N.Raia's user avatar
  • 101
0 votes
0 answers
67 views

How do I move a camera around a tiledmap in Libgdx?

I have the following code for rendering a TiledMap and moving around a Texture representing the player on top of it and the camera is setup to follow the texture around. However, when I try to move ...
Sagnik Dutta's user avatar
-1 votes
1 answer
297 views

How to access webcam in Godot on non-Apple platforms?

When I search for how to access the webcam in Godot, I find the CameraServer, but the docs say: Note: This class is currently only implemented on macOS and iOS. On other platforms, no CameraFeeds ...
Cei's user avatar
  • 863
0 votes
1 answer
46 views

Rotating around 3D cube Camera Controller for Unity

I am Unity game developer with more than 2 years experience. I am working in a personal project, a mobile game for Android in Unity. I am trying to make a camera controller for a 3D Cube Game in Unity....
DamagedCyborg's user avatar
0 votes
2 answers
78 views

Hybrid perspective / orthographic projection

I'm trying to figure out how to setup camera projections such that they fulfill following requirements: main scene is rendered with perspective projection camera / viewport controls allow only zoom (...
skrat's user avatar
  • 173
0 votes
0 answers
20 views

VR Arms in Unity can't be seen through main camera

I am making my first VR game and when I put my arms out in front of me, the forearms and hands do not show or render. They can be seen through the in-game mirror that I have but not through the main ...
skimi's user avatar
  • 1
0 votes
0 answers
31 views

How do i put an entities x,y and z coordinates to a variable(?) in Blitz3D?

I'm making a TEST 3d platformer where the camera follows the player from above. Normally I would make the camera move at the same time when the player moved, for example: ...
Probes's user avatar
  • 1
0 votes
0 answers
183 views

3D Ragdoll, skinned mesh + three.js + cannon.js

I'm trying to develop a ragdoll from a skinned mesh, in three.js using cannon.js as physics engine. I'm struggling with a lookAt problem for bones. Let me explain the method I used. I made a skinned ...
stmaccarelli's user avatar
1 vote
1 answer
42 views

Clamp rotation of a follow camera when its target is falling

I'm using this camera script to follow a cube. The cube has rigid body with gravity enabled. There is a plane on which the cube moves. If it goes off the plane, the cube starts falling. However when ...
single arrow games's user avatar
0 votes
2 answers
128 views

3D First person Rotate Character Unity

I'm facing the problem that my chacter is spinning around itself when I try to move, that's because Im trying to make my player move in the direction of the camera, but when I move it keeps rotating ...
Jamelaumn's user avatar
0 votes
1 answer
103 views

How do I make my player rotate in the current direction of my camera in Unity using C#?

I have a player with third and first person camera, I want to make my player move in the direction that my camera is looking at when I hold the right mouse in third person and move(Like my player is ...
Jamelaumn's user avatar
0 votes
0 answers
58 views

How to mod position of camera when crouching in 7 Days To Die?

I am talking about the first person camera. It is not glued at the player's head position; it moves away a bit. It seems linked to the 3D model and not to the capsule collider that shrinks when we ...
VeganEye's user avatar
0 votes
0 answers
38 views

3d camera control on XY plane controlled by mouse

I am creating a 3d game with a isometric view. I have a problem implementing camera controls. I can control angles of camera, but my view is scrollable only in the XY axis (camera is always up, Z axis)...
Darek Naurecki's user avatar
0 votes
0 answers
69 views

Well tuned orbit camera

I have been trying to make an orbit camera using glfw. I got a working solution which is as in the following. ...
atg's user avatar
  • 1
0 votes
1 answer
29 views

Moving Camera2D along with custom KinematicBody2D causes both to stop

I want to design a rigid body that moves up at a constant speed and can only be moved left and right manually. When I set the Camera2D to go vertically with the ...
Nina Monti's user avatar
1 vote
0 answers
76 views

How to achieve partial transparent effect like Diablo and Path of Exile Series

In Diablo and similar games, when the player is behind an object from the point of view of the camera, the object will (partially) become transparent or disappears. For example, in the picture below (...
Amarth Gûl's user avatar
0 votes
0 answers
78 views

How is it possible to display the crosshairs and the spaceship correctly in a 3rd person space shooter game?

I am working on a 3D space shooter game. It has a 3rd person camera, so the spaceship is always visible. I am wondering about how the aiming can be solved, since the camera is not directly behind the ...
Iter Ator's user avatar
  • 257
0 votes
0 answers
30 views

Transforming a rectangle to make sure it stays fully inside another

I am building a 2D top-down game in a custom engine. I am trying to build the camera system which allows the user to zoom and pan around the world. However, I am stuck at the point of preventing the ...
Fabrizio's user avatar
  • 125
0 votes
2 answers
97 views

How do I determine parallax scroll factor?

Implementing parallax scrolling is easy enough. This question is about improving its presentation. Hand-tuning some parallax scroll factors on multiple layers works, but parallax scrolling is meant to ...
Lake's user avatar
  • 191
-1 votes
1 answer
166 views

How do I recreate the default 2D camera in my Unity project

I was using Unity but my PC shut down suddenly; when I reopened my project, all my GameObjects, including my camera, had disappeared. The good thing is that I created prefabs of all of them (except ...
Rediet Workneh's user avatar
1 vote
1 answer
334 views

Implementing a Maya-like orbit camera in Vulkan/OpenGL

I want to create an orbit camera with zooming, panning, and rotation. I used the following examples to create cameras: https://stackoverflow.com/questions/54400422/how-to-implement-altmmb-camera-...
Wusiki Jeronii's user avatar
0 votes
1 answer
81 views

Dealing with Camera "bump" during floating origin reset

I am asking this question because my Google searches have yielded little results. My problem is basically this: I've implemented a very simple smooth follow on my camera to trail the player (who is ...
ACour008's user avatar
0 votes
1 answer
385 views

Calculating LookAt position from rotation and translation matrix

I was wondering if it was possible to calculate a lookat position from the translation and rotation matrices (aka the building blocks of my view matrix). I need the lookAt position to implement a ...
oli2's user avatar
  • 3
0 votes
1 answer
63 views

Remove transparency from second camera

I have a scene with two cameras. The goal is to display the content of one (little) camera ontop of the content of the other camera (fills the entire screen) Current problem: the content of the ...
mcExchange's user avatar
1 vote
1 answer
88 views

How to render picture-in-picture effect with libGDX camera

libGDX cameras are mostly used for layered rendering with different "world unit size," but I wonder is there a way of showing the view of for example a libGDX Orthographic camera in the ...
CallOfVoid's user avatar
0 votes
0 answers
119 views

Downscaling from 1080 to 768 in Unity 2D

I have an orthographic camera of size = 10.8 and I use it as base and have developed the game for a 1080 display. On a ...
FunnelScr's user avatar
0 votes
1 answer
169 views

GUI Using WorldToScreenPoint is Out of Control

I want to have a GUI float over a game object using WorldToScreenPoint, similar to this tutorial. However, I am experiencing strange behavior with the GUI. I assume ...
kunokouki's user avatar
0 votes
1 answer
265 views

Best Approach For Static Background Image?

I want to have a static background image of a sky that stays completely flat on screen and perfectly fits my games 1920 x 1080 display. Similar to what most old 2D side scrollers did. In other words, ...
PayasoPrince's user avatar
0 votes
0 answers
156 views

Issue with excluding object from post-processing in VR

I wanted to exclude some objects from a specific layer from rendering in the post processing. I followed both : https://www.youtube.com/watch?v=LAopDQDCwak and https://www.youtube.com/watch?v=...
Felox's user avatar
  • 67
0 votes
2 answers
82 views

How to change from gameplay camera to menu camera when colliding with a game object?

I want to know how to change which camera is outputting to the screen when colliding with another game object in Unity. I'm making platformer, and at the end of the level I want to switch from the ...
TheElectricWolf _'s user avatar
0 votes
1 answer
60 views

correct matrix to draw mesh as flat object

I need to draw a tilemap for a 2d game. For that I created vertices with their relative positions already hard baked. The coordinates start top-left with (0f, 0f) and z is always 0. I rendered them to ...
codymanix's user avatar
  • 364
1 vote
2 answers
176 views

How to create a camera that combines both forced movement and smooth player following

Context So I'm making a clone of Crossy Roads where the camera follows the player. It does some linear interpolation (Lerp) after moving, and the camera starts moving away from the player in the ...
Zeid Tisnes's user avatar
0 votes
1 answer
589 views

How do you limit the Pitch of the UE4 and UE5 camera which is on a Springarm in C++

I want to limit the pitch of the Player camera, which is connected to the spring arm attached to the player capsule. I want to do this in C++ rather than Blueprints. Does anyone know how to implement ...
emorphus's user avatar
  • 101
0 votes
1 answer
187 views

There are no body properties in Cinemachine's virtual camera

Why are there no body properties in Cinemachine's virtual camera? Unity version: 2021.3.11f1 Cinemachine Version: 2.8.9
Dhruv Agarwal's user avatar
0 votes
2 answers
558 views

Picture-in-picture in Unity

This is my first post here and I'm not too experienced with Unity, so keep that in mind. I am working on a project (a virtual streaming app specifically) where I have four cameras that the user can ...
zenzicubic's user avatar
0 votes
0 answers
319 views

How to render and interact with a seamless wraparound world map, in the style of e.g. Civ 5, in Godot 3?

I asked a similar question on the Godot subreddit but I want to ask here as well in hope of getting more detailed/different answers. I'm making a world map for a turn-based tile-based 3D strategy game ...
bluegreen1024's user avatar
1 vote
1 answer
2k views

How to calculate screen space UV coordinates from a specific camera

In Unreal Engine 4.27 I am currently trying to create a material (shader) that maps a texture onto a quad using the screen space coordinates from a specific camera. If I am using the current active ...
Benjamin Danger Johnson's user avatar
0 votes
1 answer
75 views

SDL2 - Camera only scrolls in x direction, but not y direction

I'm following along with the LazyFoo tutorial to create the basis for a simple arcade space shooter. I'm trying to get the sprite moving through the map while being tracked by the camera. The code I ...
Kevin Shaughnessy's user avatar

1
2 3 4 5
24