Game worlds are viewed from a camera, which is the viewpoint from which the game world is observed from.
1
vote
1answer
48 views
Drawing textures in 3D/2.5D at an angle using spriteBatch in Monogame
for a university project we are creating a small "2d" game. Im writing 2D in "" because we would like to achieve a look similiar to the one in games like Don't Starve (so more like 2.5D).
As you ...
0
votes
0answers
16 views
how can I orbit camera around object by touch position?
this Is basic code "Mouse Orbit" and correctly work on windows platform but In android we need touch position.
using UnityEngine;
using System.Collections;
[AddComponentMenu("Camera-Control/Mouse ...
0
votes
1answer
13 views
Translation matrix applyed to the view matrix not working (android opengl2)
I have managed to do an small app using opengl2 in android. It consists on a sphere moving over a rectangle, both with a texture. It's just a test in which I'm testing my first steps in opengl.
Now ...
2
votes
1answer
44 views
Why is my perspective layer is painted over ortho layer?
The entire game takes place in ortho with the exception of the background layer which is drawn on a perspective camera.
Everything seems to be working well except that the background is displaying ...
0
votes
0answers
20 views
Perfectly overlap GUI bounds to tiles room
I have a scene built with several rooms procedurally generated.
Then I have a GUI which should cover everything which is outside room walls.
What I cannot sort out is how to have the GUI to ...
0
votes
0answers
32 views
LwJGL 2.9.3 2D Camera
So I've been messing around with cameras in 2d. But I came across a weird bug and I was wondering if anyone could help me figure it out?
public static void createDisplay(String title, int width, int ...
0
votes
0answers
39 views
Unity stream webcam to other player (Multiplayer)
I want to make it possible, that I can draw on the stream of another player in my Unity game. The networked drawing works just fine, my problem is to stream the webcam. I've got the webcam input ...
3
votes
0answers
39 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
10 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
33 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
51 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 ...
0
votes
1answer
36 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
85 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
32 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
61 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
49 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
30 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
45 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
31 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
110 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
33 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
76 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
38 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
29 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 ...
0
votes
1answer
36 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
83 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
49 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
31 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
73 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
39 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
107 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
25 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
26 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
63 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
131 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 ...
1
vote
1answer
88 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
14 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
78 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
55 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
92 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
21 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
67 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 ...
0
votes
2answers
40 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
35 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
74 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
14 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
78 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
44 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
20 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 ...