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

learn more… | top users | synonyms

3
votes
0answers
61 views

(Monogame) Camera does not travel the way it is rotated

I've implemented camera control with mouse and keyboard. My problem is that camera goes crazy when I'm using mouse and camera does not travel the way it is rotated. Could you explain me why and how to ...
0
votes
0answers
23 views

(Monogame) Camera does not travel the way it is rotated [duplicate]

I've implemented camera control with mouse and keyboard. My problem is that camera goes crazy when I'm using mouse and camera does not travel the way it is rotated. Could you explain me why and how to ...
0
votes
0answers
12 views

If I attach a RunAnimation to my Player and move it, the Camera starts to freak

If I make a RunAnimation for my Player in 2D, then there is one Spot it works and I can move perfectly but if I move my Player to a different position,my Player stucks in Midair and my Camera starts ...
0
votes
0answers
42 views

How to Implement a 2d camera object for a side scroller game

Ok so Heres the problem. I'm Using c++ with sfml for graphics and box2d for physics. I've tried an ultra simple cam movement in the past where i lock the player to the center of the screen and offset ...
1
vote
2answers
72 views

How to align the corner of the camera with x= 0, y=0?

I need put Main Camera's bottom left corner at starting position 0, 0 (x, y) so all of its coordinates will be positive coordinates. I thought to put the pivot at the bottom left corner but I don't ...
2
votes
1answer
63 views

Camera view/projection issue

I made a simple OpenGL program but I can figure out why the camera is not working, here it's a little fragment of the Camera class: public Matrix4f getView() { // initializes the view matrix ...
1
vote
1answer
150 views

Unity 2D Diablo style movement

I've made a totally new scene for a 2D mobile game. I placed a sprite on the center of the screen and attached the following script onto it (this is basically a diablo-style click-to-move control ...
0
votes
0answers
47 views

Can you explain the following C# script for camera behavior

Here is the script, it rotates the camera left right with a target "player in this case" rotating with it. using UnityEngine; using System.Collections; public class ControllingCamera : MonoBehaviour ...
2
votes
2answers
87 views

Camera movement in unity engine

I have a basic camera setup which is angled like so: x: 30 y: 0 z: 0 Projection: Orthographic And i attached a C# component to it and made it so the camera moves with a right click and drag ...
0
votes
2answers
94 views

How to make a GameObject ignore a camera effect?

I have a 2D game and I wanted to apply bloom to the main GameObjects so I attached the effect onto the main camera, however the background also gets affected by the bloom and it gets all shiny. How ...
0
votes
2answers
48 views

Unity 5 Camera Functions Usage Error

How to use functions like ScreenToRayPoint() in Camera class? I have used this code: Ray ray = camera.ScreenPointToRay(Input.mousePosition); and it says Component.camera is obsolete, instead ...
0
votes
1answer
57 views

How to figure out which tiles are within view, and where to draw them in the grid

I know there are a few questions on here similar to mine, but none of them seem to fit my needs. I'm using pygame to implement a tile based game similar to final fantasy or zelda from the early ...
0
votes
0answers
39 views

Stretch Textures to screen width and height with StretchViewport

I have an orthographic camera that have viewportWidth = 540 and viewporHeight = 960. My backgrund texture is 1080x1920 pixels. How can i resize the texture to fit the camera using a StrechViewport. ...
0
votes
3answers
184 views

Move Camera When Player Move C#

i developing side Scrolling endless Game. i want to Change X Axis of camera as player moving to Right. and i almost Done That. but the problem is when move Camera to the Right then its look so stiff ...
0
votes
0answers
53 views

Targeting Player When Zooming Camera

I am zooming Camera when player dies, but it rotates entire screen, that is not preferable. Is there any way to zooming camera, as well as targeting player. The following code I've used for zooming ...
0
votes
1answer
149 views

Rotation around arbitrary vector (using quaternions?)

I currently have a camera which orbits a specific target object, always looking at it. The user can drag the mouse to move the camera left/right/up/down and the camera will move over the surface of a ...
0
votes
1answer
62 views

Rotate object with mouse look script

I would like to rotate an FPS camera slightly upwards during a shot as an effect of recoil, but the problem is that I have a mouse look script as well and I assume it prevents me from achieving the ...
0
votes
0answers
51 views

libGDX - “Hosting” a Viewport inside of a Scene2d Window

I am making a game using libGDX. I am trying to build some tools to use while developing my game, things like a scene editor or a scripting console. The tools are Scene2d widgets which I have in a ...
1
vote
1answer
60 views

Vertically mirroring the screen in LibGDX

I'm developing a game in which the screen layout is different for right and lefty players, so i'll put a button in it to mirror the screen vertically. For displaying textures and fonts, i use a ...
0
votes
1answer
173 views

Zoom Camera from C# in Unity

I am creating endless running game. I want to zoom camera when player dies to the player. I have tried using camera.FieldOfView, but it does not work. Is there another way to zoom In camera to the ...
0
votes
1answer
55 views

Camera bounds on different resolutions

I tried to search different solutions but also due to the lack of knowledge in camera handling I found none fitting my needs. The situation is the following. I have a 2d game structured in ...
0
votes
0answers
81 views

Implement camera in SDL

I'm trying to realize a simple camera in SDL which has its size and can be moved around. I have a vector of visible elements which will be drawn if the camera "sees" them. Now, I checked this answer ...
1
vote
1answer
163 views

OpenGL Arc-Ball Camera Yaw Pitch GLM::Rotate

I'm currently working on a small Voxel-Editor Project. In the editor, I plan on using an Arc-Ball camera which rotate around the model. My camera is currently working but in an odd way. I can't seem ...
-2
votes
1answer
44 views

How to make my “first person controller” continue to turn left or right when key is pressed in Unity 5?

I recently posted this How To Make My First Person Controller turn left and right in unity 5 but now I'm having a slight problem when I press the key that turns my camera it only does it for a little ...
1
vote
2answers
137 views

Technical names for camera styles in 2D games

In 2D gaming, the camera movement method has a lot do with the play style of the game. I'm not super familiar with the technical terms for camera styles, so I'm going to describe them in hopes ...
1
vote
0answers
52 views

Adjust the Camera Viewport Rect in Unreal Engine

Am new to Unreal Engine. I want to adjust the Camera Viewport Rect so that the camera will render to half of the screen. This is achieved in Unity by changing the Camera Viewport Rect property. How ...
0
votes
0answers
30 views

Implementing multiple cameras for multiple objects

Now, I have a Camera, and whenever I need to render elements I call the render function on the element and pass a camera to it like this: elem.render(camera); // Renders only elem, using camera ...
4
votes
1answer
148 views

Unity camera tilt

I'm programming a camera for an RTS and I'm stuck on tilting the camera up and down. I want the camera to tilt between 20 and 70 degrees using the Z and X keys. This is my code: using UnityEngine; ...
2
votes
1answer
301 views

How to avoid gimbal lock in Unreal Engine (c++)?

I created an orbit camera (sometimes called turntable camera; similar to the one with the "use UE3 orbit controls" setting in a static mesh view). I attached the camera to a USpringArmComponent with ...
2
votes
1answer
148 views

How to fix my camera collision, C# XNA

I am having some weird issues with my camera. I am trying to make it so it is a first person camera, that when the user presses the W or Up key, it moves towards where the camera is looking. My issue ...
1
vote
0answers
19 views

Changing the Camera at Some Spots Unreal 4 Blueprint

I'm making a 2D game, and during the level the camera will move together with the player. But in the end, during the final boss, I want the camera to stop and don't move during the fight. How I can ...
1
vote
1answer
142 views

Make game camera stay inside of tiled map boundaries [LibGDX]

I am creating a little 2D platform game, with the LibGDX framework. So far I have created a simple prototype level in Tiled, and loaded this map into my LibGDX game. I can use mouse and keyboard ...
2
votes
1answer
60 views

Recap on how a camera works in 3d Space?

This may be marked as a duplicate, but I have been trouble thinking about a camera. I understand that there is a "camera transform," or view matrix. However, this is multiplied with every vertex in ...
-1
votes
1answer
114 views

How to disable Camera from tilting when following a game object?

I have a game character object which is followed by camera. Camera is child object of Character. Using rigid body makes the character tilt in slopes and camera tilts too. how do i stop camera ...
0
votes
0answers
24 views

Projection type/camera angle in Alien Soldier

I am trying to build a 2D game similar to Alien Soldier from oldies (Sega Genesis). The problem I am having is with assets. What kind of projection/camera angle does the Alien Soldier use for it's ...
1
vote
1answer
107 views

Limiting Bounds of Camera

I'm using the following code which I've taken from Unity and edited it a bit, but I seem to misunderstand the right way to actually add bounds to the camera controls and the way to implement the ...
-1
votes
2answers
92 views

How to create a camera that follows the player?

I have a javascript game where I use a tile grid somewhat like this: var tiles = [ [0, 0, 0], [0, 1, 0], [0, 0, 1] ]; I want a camera to follow the player and when the player moves off the map, ...
0
votes
1answer
52 views

LibGDX: how to implement 2 cameras in a unique stage

I am quite new to LibGDX. I am trying to make a game, where the character is an Actor, and it's controlled by a Touchpad(included in the main Stage as an Actor too). My problem is that I am trying to ...
1
vote
1answer
141 views

How do I snap the Unity camera to a 2D, tile-based map?

I have a 2D, tile-based map. I want to be able to control the number of visible tiles on the screen vertically and horizontally, regardless of resolution. I want the player to be able to move the ...
1
vote
0answers
18 views

Citrus Engine - How do I set-up the camera?

(Would be great if someone with greater rep created the Citrus Engine tag and add it to this question) I want to make a game where my inner starling stage dimensions are 320x240. My game will have ...
0
votes
1answer
101 views

Make Camera Bounds

I'm new here and I have a question. (Help me Google Translate). At first I make camera from this video. First video First script (CameraController) using UnityEngine; using System.Collections; ...
3
votes
1answer
49 views

Camera horizontal shift

I want stretch my game on two monitors. I use Unity 5.3. This version support the multi-display. But, one camera = one monitor. So, have two perspective cameras (at the same position). I search a "...
0
votes
0answers
21 views

How to use camera in unity engine?

i'm new to game development, and i want to learn more about camera programming in unity. I am good in C#, so scripting is not my weak point. I dont really know how to start. Could you please refer ...
1
vote
1answer
83 views

Unity's free look camera too far away

I've been making a game to learn unity and I have been using the free look cam that comes default but have encountered a problem that I don't know how to fix. Basically the camera rig isn't following ...
1
vote
0answers
219 views

Blueprint For Switching Between Cameras In The Unreal Engine

So basically I have a scene in the Unreal Engine which has multiple cameras within it, the cameras are intentionally static as the application should behave more like a viewing gallery than a game. As ...
1
vote
0answers
105 views

Drawing objects in view of camera only in XNA/MonoGame

I am working on a Tower defense style game on mobile that uses a tile map and I am trying to determine the best way to draw overlays of those tiles. In my game, I go into build mode to build towers. ...
3
votes
1answer
150 views

Proper way to draw 1000 billboards that always face the camera

I have up to 1000 visible GameObjects with trivial plane meshes, which are essentially sprites/billboards and which should always face in the relative direction -camera.forward. There are so many ...
0
votes
0answers
127 views

LibGDX: open android camera

I need help, I can't find a solution to open camera device in my libgdx app. I'm developing it only in Android for now but I have this issue. I need only to open the preview view, no snap picture o ...
0
votes
2answers
499 views

Using Unity's `transform.translate()` to translate relative to an object but only using two axis

I'm using transform.translate() to move an object around the world space, relative to the camera that is following it. The camera has an angle of 23 degrees on the X axis. The problem is that when I ...
2
votes
1answer
112 views

How to keep the camera view to within room dimensions

me = self; view_yview[0] += ( me.y-(view_hview[0]/2) - view_yview[0]) * 0.1; view_xview[0] += ( me.x-(view_wview[0]/2) - view_xview[0]) * 0.3; This is the code I use to smooth camera ...