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

learn more… | top users | synonyms

0
votes
2answers
71 views

Pygame Scrolling Camera bug

I asked a question the other day about how to implement a scrolling camera. I got a great answer which helped me achieve that... but in doing so I have lost basically all collision detection. ...
2
votes
2answers
145 views

preventing a camera from getting stuck inside a mesh in Unity

I've a 3rd person camera similar to Mario64. Currently, I'm working on preventing the camera from getting stuck inside a mesh. The goal is to move the camera overhead. This much trickier than I'd ...
0
votes
3answers
209 views

Backround turning, follow the character

In my Unity2d-platformer, I need background to follow the character, so I just attach it. And when character turn left from right (or right-to-left), background turn too. How can I make my ...
1
vote
1answer
72 views

Find x and y position with angles in 3D world

I'm actually creating a Tracking Camera (or 3rd person camera), and to do so, I used two angles (X and Y) for the rotation of the camera and an other floating value for the distance between the target ...
2
votes
1answer
102 views

Limiting x and y movement so you can't go off camera

So I want to make an on rails shooter like that of Star-Fox in the Unity engine. What I would like to do is limit the ship from moving off the screen. You move along the X and Y axis so i wont have to ...
2
votes
1answer
399 views

How to implement view bobbing?

I'm developing a First-Person shooter game. Everything is just fine but I've a little problem with my camera moving. My FPS camera is moving smoothly! But the camera should move like a human is ...
5
votes
2answers
187 views

How far back should I move my camera to fit a given GameObject in frame?

In Unity with C#, I want to calculate the minimum distance that my perspective camera has to be from a given GameObject (a procedurally generated mesh), so that the object is fully framed by the ...
1
vote
2answers
171 views

Camera follow rotating ball - ortogonal direction

I have a ball, that has been moved via addForce. It colides in the scene with objects, leading to rotation in all axes. I want a camera to follow this ball but from the side (direction ortogonal to ...
4
votes
0answers
230 views

smoothly recenter view over time

I'm currently using the Google Cardboard SDK for Unity to build a fighter pilot simulator. What I'm currently trying to do is recenter the view(CardboardHead) smoothly over time when the user looks ...
4
votes
2answers
475 views

How to properly rotate towards a local point in Unity C#? (a local LookAt)

I am having a nightmare trying to make a child object rotate towards a given point of its parent object, similar to what is possible at the world level when using LookAt. The problem is that most ...
2
votes
0answers
102 views

Rotate perspective camera to align screen width to procedural object's width (Unity, C#)

I give up. After much trying and searching, I have to say I was unable to achieve the following task, for which I must call for your wise advice. In my current Unity 5 application (using C#), there ...
-3
votes
1answer
56 views

In Unity how do i make the camera follow a character in the y axis..? [closed]

I have a character which keeps moving in the y-axis and the camera needs to be fixed to follow with the character for some extent and when the character falls down camera should freeze at the point. ...
0
votes
0answers
50 views

What is pokemon-like game's view called? [duplicate]

I'm trying to make a game with a top down view, but angled, like pokemon, zenonia, zelda(I think), and most rpgs(specially the ones made with rpg maker). But I don't know what is this view called so I'...
0
votes
1answer
69 views

Issue creating a dynamic seemless cube map

I have a function for building a cube map, given a location in space. I also have a system for displaying cubemaps (either loaded from images or given as a texture handle), and they work fine and are ...
10
votes
4answers
4k views

How to keep my Quaternion-using FPS camera from tilting and messing up?

I am using an FPS-like camera, and it uses quaternions. But, whenever I try looking up and then sideways, it tilts, and sometimes it can turn upside down. How can I fix this?
0
votes
2answers
112 views

LibGDX: Content appears stretched although I'm using a ScreenViewport

I just fixed another issue regarding the scaling inside a ScreenViewport. And yet another problem arises: If I'm understanding the wiki correctly, a ScreenViewport does not scale or stretch the ...
-1
votes
1answer
180 views
1
vote
1answer
149 views

Why does Unity not detect my camera attached via the inspector?

I want to use camera.ViewportToWorldPoint() to show the bottom center bounds of my screen. So, I created a script and added that component to my object that needs it. using UnityEngine; using System....
0
votes
1answer
56 views

Stop player following cameras cameras direction

Okay I'm not going to go to much into it but this is what I need my script to do. The way I have my controller set up is that the camera looks to the side of the player a little bit. I use this for ...
0
votes
2answers
1k views

UDK: Sidescrolling Camera not working [closed]

I tried the sidescrolling camera from epic website but there are some warnings. When parsing the scripts and also the eidot says when running the pie mode and all I get is: Engine.GameMessage.Failed ...
2
votes
2answers
9k views

How to use Input.GetAxis(“Mouse X/Y”) to rotate the camera?

I want to make a first person camera that rotates with the mouse. I looked at the Input.GetAxis Scripting API page and found a sample code, which I have included at the bottom of my post. Upon trying ...
0
votes
1answer
78 views

Unity why do all gameobjects not dissapear from view when I switch cameras?

I am having trouble with camera switching. I have two cameras: "Camera1" and "Camera2". A "button script" attached to Camera1 allows a switch to Camera2. It also positions the cameras. There is a ...
0
votes
0answers
132 views

Camera rotation in maze game depending of accelerometer

I'm still newbie in Unity 3D... I'm trying to develop simple maze game. I want to roll my ball through maze, but I have to rotate camera left or right, otherwise the player can't see what's behind ...
1
vote
2answers
834 views

Angled topdown perspective camera for 2.5d game

I have a 2d tile based game created using Unity's 2d tools and orthographic camera: The tiles are created by programmatically generating a mesh, assigning a texture to each pair of triangles, and ...
1
vote
2answers
57 views

Camera controll in Libgdx

I've a condition in my game where, I want my camera to follow the Player(its a body from Box2d) and in some not. This is the start screen of my game: Now, when i press a button(space) the player ...
3
votes
2answers
369 views

How can I implement screen transitions like in the 2D Zelda games?

I want to implement a screen transition in the style of the 2D Legend of Zelda games (like this). That is, I'd the screen to remain static until the player moves to an exit, at which point the next ...
4
votes
1answer
844 views

How can I achieve a zoom-like camera effect?

I have a top down 3D camera: view = Matrix.CreateLookAt(new Vector3(0,0,20), Vector3.Zero, Vector3.Up); Now I want to achieve the effect like when I zoom in the scene and only show a section at the ...
0
votes
0answers
233 views

camera or position issue when render sphere with cocos2d-x 3.7

See code below bool HelloWorld::init() { [....] auto size = Director::getInstance()->getWinSize(); // setup camera auto camera = Camera::createPerspective(30, (GLfloat)size.width/...
0
votes
1answer
56 views

How to set up the camera for a PS Vita game?

I am starting my first project for Unity and I want to start a new game for PS Vita. This console has a resolution of 960x544 pixels. How do I have to set up my camera so that it adapts to this ...
5
votes
1answer
614 views

Why do my game objects jitter when moving the camera?

I'm moving from Qt Widgets' QGraphicsScene to Qt Quick's QQuickItem for rendering my game objects. One of the things this involves is setting up a scene and the view onto that scene, as this was ...
15
votes
6answers
2k views

Creating my own kill cam

I plan on creating my own kill cam system for a sandbox tool set. After thinking about the mechanics of the kill cam itself, however, I'm quite lost. I'm trying to recreate the ones commonly seen in ...
0
votes
1answer
180 views

GameObject is only rendered when it has a negative z scale

I have an orthographic camera that looks like this: I create 2d polygonal meshes that have uniform z values in their vertices. I use Camera.ViewportToWorldPoint() to map these viewpoint vertices to ...
2
votes
1answer
92 views

Viewport and Camera setting

For my first game in LibGDX and Android I got a Problem: I have a background picture which is 2560px * 720px. The screen is 1280 * 720. How do I have to set the viewport and camera in order to get ...
0
votes
1answer
57 views

Camera (pole cam) implementation problem

In my project I have simple scene graph to render whole scene and Bullet physics SDK to provide physics simulation. Each rendered object is represented as scene node. Camera always has target and ...
1
vote
2answers
85 views

Problematic cameraposition (Eye = (0,0,0), at=(0,-2,0) and up = (0,1,0))?

I am taking a course in computergraphics and we talk a lot about OpenGL and the math you need to do everything OpenGL does "by hand". A Question which was asked in an old exam (I am preparing at the ...
0
votes
0answers
112 views

Unity forward render path creating pixel lines between meshes

I have a bit of a problem where my meshes are either unsmooth because I'm using deferred rendering path or they are smooth using forward rendering path but it creates this weird pixel line between the ...
2
votes
4answers
1k views

Smooth Camera Follow

I am using a fixed static background. I have a gameobject(Current ref. image) which is moving with the help of waypoints. I have made camera to follow the Current. The camera is stuttering while ...
-1
votes
1answer
247 views

How to make smooth 2-d zooming in Processing

I am making a 2d game with camera zooming using Processing. Currently, my program reduces the size of each block by one. This works very well when there are only a few blocks on-screen, but not when ...
-1
votes
2answers
240 views

FPS camera specification

I remember I once composed a FPS viewing transformation, as a composition of 3 rotations, each with an angle as a parameter. The first angle specified the left/right rotation around the y-axis, the ...
3
votes
2answers
95 views

How to manipulate the two variables that rotate the camera with Input.GetAxis(“Mouse X/Y”)?

A helpful fellow showed me the script for a free look camera mode that rotates with the mouse. The script is included at the bottom of the page. I want to have a system that right clicks once to ...
2
votes
2answers
1k views

Make camera follow and rotate with player without childing it

I want to have a camera, that follow the player, without childing it to the player object. So far I have this one line, that follows the player, but does not rotate with it (meaning the camera should ...
0
votes
0answers
15 views

Feeding accelerometer data to vjoy

I am getting roll, pitch, yaw data from my accelerometer data. How do I map it to vJoy's appropriate axes given as X, Y, Z, Rx, Ry, Rz and Slider1, Slider2? Do I have to reverse engineer into ...
1
vote
0answers
49 views

Interpolate camera rotation over many keyframes smoothly

I have a defined set of rotation/position keyframes that I want a camera to animate between smoothly. Handling the position is easy enough using cubic bezier curves (and just auto-generating the ...
0
votes
2answers
115 views

Stop Lerp at relative location?

In my Unity 2D platformer, I'm trying to move the camera down a bit when the character is crouching but not moving. I've done this with the following: cameraPosition = mainCamera.transform.position.y;...
0
votes
1answer
421 views

How to combine the camera that follows the player and the camera shake effect in Unity?

I need to combine both camera that follows the player and the camera shake effect in the same moment. The problem is in that, if I make the shake effect for the camera, then the camera doesn't follow ...
2
votes
1answer
367 views

How can I add a transparent overlay to a UI in libGDX?

I am attempting to use the following code shapeRenderer.begin(ShapeRenderer.ShapeType.Filled); shapeRenderer.setColor(3,3,3,.3f); shapeRenderer.rect(0,0,gameWidth,gameHeight); ...
1
vote
1answer
237 views

Implement dynamic 2 player splitscreen based on player positions

Having a local 2 player game, when the distance between the player is big enough, we have a splitscreen whose shape is defined by the angle between the two players. When they get close enough to each ...
1
vote
2answers
312 views

LibGDX - Managing a Minimap

I'm making a top-down strategy game so I thought a minimap is a must. I'm using Scene2D to display my GUI and since the minimap is technically a part of the GUI, I used the stage camera to position ...
2
votes
4answers
711 views

Moving camera, or camera with discrete “screens”?

I'm making a game with a friend, but having trouble deciding on a camera style. The basic idea for the game, is having a randomly generated 2-dimensional world, with settlements in it. These ...
2
votes
1answer
112 views

How to calculate if a point is contained in rectangular camera viewport with rotation?

I am working with my camera, and am trying to improve it so that I can calculate if a world point is on screen, taking rotation into account. Currently, my camera rectangle is calculated as so: ...