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
0answers
51 views

OpenGL Diffuse Lighting Issue

I seem to have a problem in my OpenGL scene where if I (the camera) am looking at an plane it's brightness changes depending on what angle I am to the plane. It seems as though the camera is a source ...
0
votes
1answer
32 views

In Unity, what does the camera script's “Behaviour missing” error mean?

I started in Unity few days ago and made a cube with a tank control style. Now I'd like to create controls similar to 3D fighting games (Gunz, Blade Symphony, …): Control body direction with the mouse ...
0
votes
1answer
39 views

How do I rotate a cube around an axis, relative to the camera view?

I want to be able to rotate a cube, either by dragging vertically to rotate it around the Y-axis, or dragging horizontally to rotate it around the X-axis. However, when the camera is rotated 90 ...
-1
votes
0answers
18 views

How to add thermal effect to bitmap or YuvImage Live CameraPreview [closed]

I want to add thermal effect to Live Camera in Android . I am successed in implementing greyScale effect to live Camera. But don't know how to set thermal effect to yuv or bitmap . You can see my ...
0
votes
0answers
26 views

Rotate the camera on a given angle

Good day! I apologize in advance for my bad english. The task is as follows: "On the stage there is a camera and a gun with rays when a ray gun out of sight of the camera (vertical) is required to ...
0
votes
1answer
33 views

Pan camera within bounds of large image

I have a camera that I pan around a large image which works fine, however when I reach the end of the image I can keep panning on and on, forver. I have looked everywhere for an answer on how to ...
0
votes
0answers
101 views

Problems with First Person Camera in C++ OpenGL

I'm building a first person camera for my application but I'm having a couple of problems relating to moving the camera. In general, I have 2 vectors, one for the camera's position and one for the ...
0
votes
1answer
39 views

how to stop camera at the end of world map when zoomed in

Im building a tile-based game, and Im trying to implement zooming in on the center of the screen. My problem is, when I get to the edge of the map and im zoomed in, Im noticing that my camera doesn't ...
2
votes
2answers
93 views

How can I set up an intuitive perspective projection/view matrix combination in OpenGL, using GLM?

Could anyone help me set up an intuitive perspective camera matrix using OpenGL and the GLM library? By "intuitive" I mean that I want the camera to be looking at the middle of the screen down the -Z ...
0
votes
1answer
31 views

Relationship between Camera's view size, screen resolution and objects scale

I've had this question since a long time ago and wanted to know the relationship between how an object is viewed through the camera depending on the resolution of the device, the camera's view size ...
0
votes
0answers
59 views

Unity 2D Game: Camera following target and looping stage

I'm with a problem and I need some help, because I'm on early learning of gaming and Unity, and i want to learn doing it, so, i need all the help, you developers know how each little help, helps a ...
1
vote
1answer
53 views

Determine which face of a cube is facing the camera

I have a Cube with a unique color for each face. I made a script where I can swipe and rotate the Cube in increments of 90 degrees in each direction. what's the best way to determine which face of a ...
0
votes
1answer
76 views

Calculations for a camera system

I am building an interactive application in Starling for which a camera system is required. Since there is no existing camera system in flash and the addons for starling do not meet our requirements, ...
0
votes
0answers
28 views

Camera is in the wrong position with assimp

I have created a model in 3ds max (exported as fbx) with two meshes and a camera in Assimp. After importing the scene and making the transforms to get everything in the world view I have managed to ...
0
votes
1answer
40 views

Everything black except where there's a light

I have a camera in my scene with a map created at runtime: As you can see everything can be seen. Now I want the map to be invisible (black as the background) except where there are lights. How can ...
-2
votes
2answers
67 views

In Unity, how do I make the camera follow a character?

When my character moves, I want the camera to follow them, such that the character always stays in the middle of the view. How do I do that in Unity? Here's my code right now: using UnityEngine; ...
2
votes
2answers
72 views

How do I keep my orbiting camera upright?

I am working on code that rotates the camera around a point on the in-game map when dragging the mouse. I understand how to lock it so it stays above the map surface. However, if I keep rotating the ...
0
votes
0answers
23 views

Cameras overhead

I'm planning on using several cameras on Unity with different size to create a parallax background. I'm concerned that addidng maybe 3-5 cameras just to render the parallax background is an overkill. ...
1
vote
1answer
28 views

Unity free look camera on two axes. How do I do it?

I'm new to Unity and c# but have programming experience... I have a a simple "game" in Unity that shows one sphere orbiting another. How do I allow the camera to be moved by the user in a "free ...
1
vote
1answer
381 views

Destroying Unity GameObject when it goes out of camera during runtime

I have this GameObject instanciated in unity - void Start () { GameObject myRoadInstance = Instantiate(Resources.Load("car"), new Vector3(5, 5, 5), ...
0
votes
0answers
34 views

Particle system ONGui()

I have some scripts which uses OnGUI() method and they are attached to my GameMenu object. I need to play a particle system on the scene while the GUI scripts are active. When I do that I cant see the ...
0
votes
1answer
36 views

Check if is object in camera field and not covered by other object

I know how to check if object is in camera view but how I can check if that object is cover by something elese? In my case I want to turn on or off some effect when I look at light. At this moment my ...
1
vote
1answer
136 views

Adding some recoil to the Camera so that the crosshair is pushing to the sky (FPS game)

I just want to add some recoil to the camera, but I can't find a working script. It's an fps, so I take my mouse axis to rotate the camera. And now I want a pushback to the top, so that the camera ...
0
votes
2answers
43 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 = ...
4
votes
1answer
110 views

What direction is forward when the rotation is (0, 0, 0)?

I'm representing the rotations of my actors (or gameobjects) with euler angles (one float for each axis). And I've always considered the vector (1,0,0) (x,y,z) to be the actor's direction if all ...
1
vote
0answers
39 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 ...
1
vote
0answers
51 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. ...
1
vote
1answer
38 views

OrthographicCamera and viewport not giving expected effect

I recently asked a question about this area that I think was too broad, so I will try a new approach. I have the following code I am experimenting with: batch = new SpriteBatch(); ...
0
votes
1answer
81 views

The camera in a 2D tile based side scroller is moving slower than the player [closed]

In my 2D tile based side scroller, I want a camera that scrolls in the x direction, but not in the y direction. The world is separated into three zones; one on the left and one on the right where the ...
1
vote
1answer
89 views

How To calculate camera boundaries

Is it possible to calculate the exact camera bounds? By this I mean the white lines that represent the camera area e.g the lines in the picture: I'm using Camera.main.screenToWolrdCoordinates to ...
0
votes
0answers
21 views

How to get camera to follow player, but stop when reaching end of screen? [duplicate]

I'm making a 2D game in Unity and I'm having issues with the camera. I need the camera to stay within the boundaries of the level (the background sprite), but then follow the player around the level. ...
3
votes
1answer
158 views

determining view boundaries based on z position when using a perspective projection

I'm using three.js to make an animation of a box moving around the screen in 3 dimensions. It is moving pseudo-randomly, according to a noise function. So, I want to place an invisible wall just ...
0
votes
0answers
50 views

Images not scaling properly in LibGDX when using “batch.setProjectionMatrix(camera.combined);”

I am trying to put Assets into my game but when i put in the line of code "batch.setProjectionMatrix(camera.combined);", which from my knowledge scales the Asset to the size of the window it appears ...
4
votes
2answers
322 views

How can I achieve a pseudo-3D camera effect like this?

I am trying to achieve a pseudo-3D camera effect similar to this: I have gotten the following results using a 3D camera and billboards: I am now running into the following problems: In the ...
0
votes
1answer
85 views

WebGL (three.js) - rendering object behind camera far plane

I need to have one object that is always visible/rendered (a lens flare, to be exact). I don't want to set the camera far plane to the maximum possible distance between camera and the sun (performance ...
0
votes
0answers
37 views

Matching the 3ds max camera view in my game 1:1

I want to match 1:1 the 3ds max camera render with my 3d engine (DirectX 11, C++). I believe that my mesh exporter (coded with MaxScript) works fine, I see the right shapes. But something about the ...
1
vote
1answer
166 views

Camera is centered on character, but doesn't show character in game window

I'm using Unity 4.6.3. I create an animation from sprite. When I press Play button, I see animation plays on scene window, but on Game Window, I don't see anything. Here is Inspector for main ...
0
votes
0answers
38 views

Motion Blur (as per GPU gems article) only considers camera rotation, not translation

I am following this article and have implemented it exactly as described: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html The problem is that things are only blurred when the camera is ...
0
votes
1answer
40 views

First Person Camera Target

I have a camera at position P, and a normalized direction vector D (where the camera is facing). I want the target of the camera to be 5 units forward from the position. Here's my attempt: F = (0, 0, ...
1
vote
2answers
213 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 ...
0
votes
1answer
72 views

Camera movement constrained to pixel boundaries

So a friend and me, we are currently making a game in C# using XNA. We are trying to get the camera to move in full pixel motion, but we just don't get it right. This concept is hard to explain, but ...
0
votes
1answer
93 views

2D game with angled top-down camera perspective [closed]

I want to create a game similar to binding of isaac, a slightly angled top-down 2D game. In binding of isaac, the character moves and shoots along a 4-way path, so when he is shooting towards East, ...
0
votes
1answer
45 views

Aligning Camera to Rectangle

I'm working on a game in Java, and I'm having some trouble with finding the correct camera position. I've already made a Rectangle that shows exactly where I want the camera to be, and at what scale: ...
0
votes
1answer
62 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
3answers
81 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 ...
0
votes
1answer
87 views

libgdx - Box2d debug draw not correct

I have a problem where the bodies in my debug draw does not draw correctly, take a look: As you can see, there is some space between the dynamic body and the ground. I have checked the contact ...
0
votes
1answer
31 views

How to compute the forward facing direction from three angles and then translate along it?

Given: float yaw, pitch, roll; How does one compute the forward direction: vec3 forward = computeForwardFromEulers(yaw, pitch, roll); Next, I would like to use this information to translate an ...
0
votes
1answer
98 views

Distortion problem with perspective projection

For various reasons – partly educational, partly technical – I'm writing a 3D game engine from scratch, using OpenGL 3.0; aiming for Core Profile, eventually, so of course I'm using a custom matrix ...
0
votes
2answers
70 views

How to fix the character flip when using an orthographic camera in libGDX

I used an orthographic camera to follow the character (player), but the problem is that my character is flipped. There are no tutorials on how to fix this. Please help as fast as possible. Here is ...
0
votes
1answer
89 views

Rotate camera keeping player not in the middle

Here I have a 2D top down game. Currently the camera is set on the player position. The player constantly points to mouse position. I want to modify this setup having the camera to be set slightly ...