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

learn more… | top users | synonyms

1
vote
1answer
20 views

Unwanted highlight on far side of objects near the edges of the screen when using orthographic camera

I was creating a simple unity game with a sphere as a ball. The problem is that the ball face towards the camera origin renders material correctly but the one away from camera does not. The ball has ...
1
vote
1answer
2k views

Libgdx Do a fixed rotation for orthographic camera

I'm trying to rotate my OrthographicCamera in the render loop to a fixed angle, but I can only make the camera spin. This is the code that I have: in create(): OrthographicCamera camera = new ...
0
votes
1answer
47 views

Covert Minimap render texture to 3d space position

I am using Render texture to make a Mini Map it is working fine but now I want to go further on side map and want world space position from render texture click point. Is there any way available that ...
0
votes
0answers
13 views

Resolution-Independent Rendering squishes view field

For the last couple of days, I've been trying to get a resolution-independent renderer going on an XNA game. I have a camera and a renderer class that I added, based on this tutorial Here's the ...
2
votes
3answers
1k views

How do I determine the look-at vector of a free-look camera?

I'm trying to create a free-look camera with DirectX 10. I've figured out how to get the directions for forward and back and left to right. However, I don't know how to rotate the look-at vector of ...
2
votes
1answer
18 views

DX11 Camera not working properly

I'm currently trying to implement a ArcBall Camera which should fly around a given XMFLOAT3 position stored in a cb with a spezified distance to the position. I used the code from Allen Sherrod for ...
1
vote
1answer
117 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 ...
2
votes
1answer
164 views

Unity5 - A Shader to blur far plane edges?

I need some help. In my Unity5 game I'm using two cameras, First camera renders the actual terrain and game objects (wich has a far plane of a 1000 units) and the Second camera renders a 3d skybox of ...
1
vote
4answers
72 views

How can I min-max quaternions?

What I'm doing In my engine, I'm trying to implement a camera that will follow a target object, such as a player. I wanted to avoid just simply using the inverse of the target's transformation, ...
4
votes
2answers
1k views

How to mirror flip animation curves in Unity?

I have a animation that moves my camera from left to right. Now I'd like to copy it with 'mirror' transformation so I can use it to move from right to left. Is it possible to do it using script or ...
0
votes
1answer
46 views

Player collision with object

so I have an fps controller, and I want to change camera when it collides with a box collider. I think I did it properly but it didn't work. Here's my code. using UnityEngine; using ...
0
votes
1answer
54 views

Getting the Right Vector from the Forward Vector

I'm currently working on a small Camera (ArcBall) and I finally am starting to understand how it will work. I will first create a basic View Matrix using a LookAt function. Then, I will send the ...
0
votes
1answer
51 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 ...
2
votes
3answers
1k views

Camera.WorldToScreenPoint not working with perspective

transform.position = Camera.main.WorldToScreenPoint( new Vector3( origin.position.x, origin.position.y, origin.position.z ) ); I have this code on a Unity 4.6 UI object. The origin is some transform ...
2
votes
1answer
1k views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
4
votes
2answers
269 views

Rotating a 3rd person camera toward a target

I have a 3rd person camera that doesn't look directly at the player but somewhere in front of him. When the user enter shooting mode, I want the camera to turn around the player to face the target. ...
0
votes
1answer
41 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 ...
0
votes
1answer
92 views

Unity Animated Player Character Rotation Glitch

I was wondering if anyone experienced this issue in Unity with Mecanim-animated characters ... I have an animated player character with a third-person camera control (Game Camera from the asset ...
3
votes
2answers
121 views

How to set “near” value properly?

Usually, the camera's near value is set to sth like 0.1f. However, this (assuming 1.0f = 1 metre) makes everything that's closer than 10 cm from the camera invisible. On the other hand, when working ...
1
vote
0answers
142 views

OpenGL ArcBall Camera

I'm currently working on a OpenGl Project and I have alot of difficulty understanding how arcball camera work. From what I have read online, all I have to do is to rotate a camera around a target and ...
0
votes
1answer
39 views

Unity 5/C#/Scripting Switching Cameras

How can I switch cameras from First Person to Third person or from thrid person to first person. Like at GTA V you can switch the cameras. How to do this? Tnx for your time.
1
vote
2answers
403 views

LWJGL: Camera distance from image plane?

Let me paste some code before I ask the question... public static void createWindow(int[] args) { try { Display.setFullscreen(false); DisplayMode d[] = ...
1
vote
0answers
14 views

Unity - How to match camera bounds to width

While stretching camera bounds, changing width adds black offset while changing height stretches image. How can I achieve opposite behavior and match the bounds to the width instead of height ?
2
votes
1answer
527 views

In UE4, how do I turn my character's body together with the camera?

I made a simple punch animation in Blender and exported it into Unreal Engine 4. In-game, the character appeared from a 3rd-person perspective, but I made it look like first-person by adjusting the ...
-1
votes
2answers
67 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
0answers
49 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 ...
3
votes
0answers
52 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 ...
1
vote
1answer
374 views

Unity: Adjusting the camera so that the scene view and the game view look same

when I make any object I'm able to see that by other side in the game view. And this troubles me in adjusting the objects. So can anyone help me to adjust the main camera in such a way that views of ...
0
votes
1answer
45 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
0answers
33 views

Quad not rendered correctly after window resize

I have a orthographic camera. With the help of this camera i'm able to render a quad onto the screen using screen-cordinates. Using the camera i perform the zoom in/out on specific mouse position ...
0
votes
1answer
300 views

Fixed background on a SurfaceView

I'm currently working on a top-down twin-stick shooter for Android. I've got my player moving around and shooting, but I'm looking to add a large Bitmap background which is larger than the device ...
0
votes
1answer
30 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 ...
1
vote
1answer
108 views

XNA arcball camera steering issue

I have an arcball set up to follow my model in XNA. It rotates around the target correctly when holding in the left mouse button and moving the mouse. It zooms in and our correctly with the mouse ...
2
votes
3answers
208 views

Different Screen Sizes and Camera in Unity

Now I know that no matter what the screen size is the camera will keep its height, so no worries about that. My question is, is there a way to manipulate the camera, either its orthographic size, or ...
6
votes
3answers
3k views

LibGDX keep camera within bounds of TiledMap

I have a simple TiledMap which I can render fine. I have a player hopping (with Box2D) around and my camera follows the player around: cam.position.set( player.position().x * Game.PPM + ...
1
vote
1answer
66 views

ScreenSize vs. WorldSize

While programming a game with LibGDX, I came across a problem. My OrthographicCamera wasn't centering in the right place. I was trying to center the camera by using the line of code: ...
1
vote
3answers
374 views

Orthographic Camera settings for a 2D game

I'm starting out a 2D wrestling game in Unity 5 and i need some help. The default resolution of game needs to be 320x240. The background sprite that i would be using is 640x480. The camera would move ...
0
votes
0answers
35 views

Orthogonal Tile Map with Camera's fixed rotation

I am working on a game that will have a 2D orthogonal view and Tile maps like, for example, Super Nintendo's Zelda (or something less old and nostalgic but with similar maps :). It will have mainly ...
0
votes
0answers
26 views

Faster ways of rendering to a texture what is viewed by a camera in a given specific moment (Unity)

What I want to achieve is to render to a texture what is viewed by a camera in a given specific time or frame, and then stop rendering to the texture, delete the camera and stay with that texture for ...
3
votes
2answers
91 views

Unintentional slight arm position change

In the scene I have a capsule with a camera parented and a looking script so when I look down or up the weapon slightly moves forward and then moves back when I look straight forward. weapon when I ...
2
votes
3answers
713 views

Player jitter when positioned at large coordinate values

I am trying to make a simple top down scrolling shooter using Unity3D comprising of the following elements: 1) Top down orthographic camera: points at 65 degrees towards the ground. At a height of ...
1
vote
2answers
35 views

How to make a Sprite be displayed always behind everything else?

What I am in need to achieve is to have a Sprite always facing the camera identically to what happens with any simple game UI object, but instead of always displayed above everything else, it should ...
1
vote
1answer
36 views

Smoothing a rotation vector

I am currently using OpenCV to track the face of a person. With this I extract the feature points and calculate the objects heads pose by applying the "solvePnP" function. This function gives me a ...
0
votes
1answer
36 views

Drawn frustum does not match with glm::perspective

I am working on a personal project and I got a 3d viewport with moving camera working nicely. Now I am working on being able to freeze the time and switch to a debug camera and move in the game ...
1
vote
1answer
134 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 ...
3
votes
1answer
1k views

Phaser / PIXI: World size vs. Stage size

I am using Phaser to build a zoomable / pannable 2D map with the intended functionality being that the home camera position is always in the middle of the World coordinates. I have a problem where my ...
0
votes
2answers
67 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 ...
1
vote
1answer
83 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
31 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
3answers
149 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 ...