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
25 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
46 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
1answer
28 views

UNITY3D - Orthographic Camera not render SHADER (2D GAME)

I have a problem with camera render, see the video please :) (note.: sorry for the music) http://youtu.be/BB8rXIzIWVU In Camera "Perspective", i can see the effect of shader: In Camera ...
0
votes
0answers
20 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 ...
0
votes
0answers
17 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, ...
1
vote
2answers
34 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 ...
0
votes
1answer
36 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
400 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 ...
1
vote
1answer
36 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
0answers
44 views

equirectangular panorama rendering?

I want to render my scenes as equirectangular panorama frames. I can get the angular fisheye which is what I actually need by applying the rendered frame as a texture to a correctly UV mapped circle. ...
0
votes
2answers
32 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
1answer
41 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 ...
1
vote
1answer
41 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 ...
3
votes
2answers
208 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 ...
0
votes
0answers
20 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 ...
0
votes
1answer
28 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 ...
2
votes
4answers
348 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
93 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 ...
3
votes
2answers
61 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 ...
0
votes
1answer
45 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 ...
2
votes
2answers
152 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 ...
1
vote
2answers
121 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
50 views

Making certain GameObjects visible for a camera

I have 2 cameras in my 2D game. One displays gameobjects normally, and the other camera draws some of these gameobjects reflected (scale.y *= -1). The reflected camera would draw only objects in the ...
0
votes
0answers
7 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
2answers
80 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 ...
1
vote
0answers
26 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 ...
1
vote
1answer
46 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
2answers
50 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
1answer
44 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: ...
1
vote
0answers
21 views

Error in projecting coordinates from FitViewport to screen in LibGDX

i'm using a FitViewport to render my "game world". Viewport virtual dimensions are fixed 400x240. I use viewport.unproject method to scale input touches from screen coordinates to world coordinates, ...
0
votes
1answer
54 views

Stop rendering hidden objects libgdx

I currently am hiding objects that are not in the frustums view. However, some objects are still being rendered that are in the frustums view, but are hidden. My goal is to not render objects that ...
0
votes
1answer
106 views

How can I implement a quaternion camera?

I am trying to implement a quaternion camera in OpenGL 3.3. I have so far used these tutorials below however I have a bug which I cannot work out how to fix. ...
0
votes
0answers
46 views

LibGDX with Parallax Camera, unable to accurately select objects

So, basically I borrowed the ParallaxCamera test that LibGDX provides and got the camera set up rather nicely. However, I noticed that when I specify a speed other than 1, my game objects shifted ...
1
vote
1answer
82 views

What is next to interpolate camera position with smooth speed changes?

I am working on a path camera to be used in demo playback. (3d game) The spline math used is catmull rom. I am on my second attempt to get constant position speed :( (someone else is doing rotation). ...
0
votes
1answer
73 views

Monogame / XNA - Multple 2D Cameras (Rectangle) on screen

I recently started building a simple 2D roguelike game using Monogame 3.4. I was keen on building the game "engine" myself as I saw it as a fun learning curve. Monogame was pretty much the best option ...
1
vote
1answer
70 views

Why is the camera tilting around the z axis when I only specified x and y?

My goal is to program a camera to point towards the mouse cursor. I attached the following script to the Main Camera. using UnityEngine; using System.Collections; public class CameraController : ...
1
vote
0answers
25 views

Quaternion camera in 3D space with Pitch and Yaw

I am having trouble implementing a quaternion camera that can fly freely in 3D space with only Pitch and Yaw rotations. It works fine except when you look up or down and then try to look left or ...
-1
votes
1answer
37 views

Camera rolls instead of looking up and down

I got a small script from the official Unity forum which is: public class MouseRotationUpDown : MonoBehaviour { public float RotationSpeed = 5; void Update () { ...
0
votes
1answer
68 views

How to put the “camera” inside a cube in OpenGL

I'm really new to OpenGL and can't seem to figure out how to put the "camera" inside the cube I've created so that I can move in an FPS-like style. I tried to use gluLookAt and gluPerspective but I'm ...
-1
votes
1answer
58 views

Why is this unity camera moving in weird directions?

I have the following script public class CameraScript : MonoBehaviour { public bool AllowZoom; public float zoom; public float Speed; Transform board; void Start(){ ...
4
votes
1answer
164 views

Convert large range of numbers to a smaller scale

What is a good formula to use in order to relate two different scale distances to each other? For example, I have a camera that can have a minimum size of 2 and a maximum of 10. I would like the ...
2
votes
1answer
100 views

2D Camera sizing and movement

Apologies if this is a basic question, or been asked a 1,000 times in the past... I'm new to Unity, and having problems understanding some of the basics to do with 2D cameras (orthographic), and ...
2
votes
1answer
82 views

What can cause shadow slicing while moving camera?

Can't explain better than with video: https://youtu.be/4nIMIL6w-0M The effect I'm trying to achive is a simple fog of war. See, I have a point light casting shadows on a plane. The plane has a ...
3
votes
2answers
62 views

Unity Change Sceneview to camera view

On selecting camera, I get the camera preview. In Unity, while editing the scene, I wish to switch in such a perspective view that is exactly visible by the main camera. Is there a short cut to ...
1
vote
1answer
56 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
1answer
54 views

DirectX is the camera a point or a plane?

I've built an application in SlimDX using an orbit camera. Currently I treat the position of the camera as a singular point in space. I've noticed my projections from 3D space to 2d space are off by ...
1
vote
1answer
61 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 ...
0
votes
1answer
75 views

Free camera rotation in 3D space

I'm using a view matrix to do camera movement and rotation. viewMatrix = new Matrix4f(); viewMatrix.setIdentity(); Matrix4f.rotate((float) Math.toRadians(rx), new Vector3f(1,0,0), viewMatrix, ...
0
votes
1answer
38 views

OpenGL ES 2.0 basic camera issues

I am having issues with the camera, I cant find how to invert the AXIS Now A point is 0,0,0 B point is 1,0,0 C point is 0,0,1 What I want is A point 0,0,0 B point 0,0,1 C point 1,0,0 ...
1
vote
1answer
52 views

Why value 1 in OrthographicCamera viewPort width?

So, I read that camera = new OrthographicCamera(1, h/w); creates a camera with an appropriate width and height for the field view.. However, I can't understand that value 1 for the viewport width, ...