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

learn more… | top users | synonyms

8
votes
2answers
307 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. ...
2
votes
1answer
63 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 ...
3
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 ...
2
votes
1answer
16 views

Unity VR: How to draw camera on top of VRSettings.showDeviceView mirroring

We're using VRSettings.showDeviceView = true to mirror the VR display to the main window. We also have a camera that we'd like to draw over top of the main window's mirrored VR image. This other ...
1
vote
2answers
42 views

Camera relative movement is pushing into/off the ground instead of parallel

I'm building upon roll a ball tutorial in unity, and I have managed to rotate the camera around the ball just fine with the code below. But there's one problem. In this code, when I add force to the ...
2
votes
0answers
84 views

Generate camera shakes in Java

How would one of these work? (If you don't know what I'm talking about, think like in a game where you shoot a big gun, and your screen bounces in the opposite direction.) I've been experimenting ...
3
votes
3answers
243 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 ...
-5
votes
1answer
55 views

What do you call the camera movement type in starcraft?

Yeah, that's it, I cannot figure it out for the life of me. What I'm curious about can be seen in this YouTube video (at 3:58).
1
vote
1answer
115 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 store,...
1
vote
1answer
54 views

2 cameras that each player sees through a different one

Im very new to Networking in Unity 5. Im trying to bring the finished basis for my 2 player, 1 vs 1, turn-based game I made for local multiplayer (both players on same computer) to an online ...
1
vote
1answer
122 views

How to create 2D cameras in swing?

What is the best way to create a camera for a 2D platformer using swing, and I want to create a camera that moves instead of moving the background. This is because I'm going to have objects rotated by ...
2
votes
2answers
417 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[] = Display....
1
vote
1answer
43 views

Which is the most efficient way to make the screen follow a sprite?

This is my first non-board game and I'm trying to learn a bit about 2D graphics in Java. But I don't know, how should I efficiently implement a camera to make the screen follow the main character. I ...
2
votes
0answers
47 views

Directional, Smooth scaling

I am fairly new to game maker, and I am trying to create a directional smooth scaling camera. Think Civilization 5's camera, when you zoom the camera, it zooms in towards the mouse, keeping the in-...
1
vote
1answer
60 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 ...
1
vote
1answer
33 views

Check if vertex is visible in shader

Im trying to figure out when a vertex is visible from the main camera. I have this function: bool in_frustum(float4x4 M, float4 p) { float4 Pclip = mul(M, float4(p.x, p.y, p.z, 1.0)); ...
3
votes
2answers
43 views

Clamping camera forward and backward vector in Unity3D

My perspective camera is rotated on the x axis. I've implemented a zoom with the scroll wheel and it works great. I'm trying to limit the zoom, however. My solution right now is to take the relative ...
2
votes
1answer
26 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 ?
0
votes
1answer
99 views

How do you create a camera with target-focus behavior in Java?

After making some progress in my game, I was looking around for camera scrolling methods to use for my TDS game and found one that I thought would work well for it. This is an example of what sort of ...
0
votes
1answer
334 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 ...
1
vote
1answer
112 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 ...
1
vote
1answer
38 views

why the camera won't rotate around my object?

im new to unity scripting, and now am building upon "Roll a Ball" example in unity training. I wanted to make the camera rotate around the ball in the scene in Y axis, when mouse is moved, and watched ...
0
votes
1answer
51 views

canvas screen space camera rotation issue

I have a canvas on a camera set to it's screen space (not as a child of the camera) I have my camera rotate on the y and x axises but whenever I move it on the x axis (up and down) the canvas doesn't ...
0
votes
3answers
82 views

How to do camera follow without drag and drop in Inspector in Unity?

How to do camera following an object with special tag without drag and drop into Inspector? I have 2 prefab model they are not into hierarchy for the moment when player start play. To load selected ...
0
votes
0answers
36 views

How to scale the camera

I'm developing a game engine (for the sake of knowledge) using OpenGL ES 1.x (Android). And there is a problem with scaling. To ensure that all textures are displayed correctly on various devices I ...
0
votes
1answer
84 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 ...
1
vote
1answer
53 views

Zoom camera on player

I am developing a simple side scrolling game. I want to target and zoom camera on player when he dies. But it rotates the screen, and I want to prevent it. I'm copying the snippet of code here : ...
2
votes
1answer
148 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
58 views

How do you solve where the camera should be on a bezier curve depending on player? (camera on rail)

I am writing a game where I require a camera on rail; That is, the camera's path is fixed and follows a bezier curve. However, I cannot find any resources online for solving the closest point on a ...
1
vote
1answer
56 views

Virtual game dimensions - how to implement?

I'm creating a fighting game in LibGDX with a static board, camera moves only right<>left. There are 5 screen aspect ratios in Android and Apple so I have created 5 different background graphics: ...
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
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 ...
4
votes
2answers
2k 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
67 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 System....
0
votes
1answer
52 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
66 views

How can I convert an orthographic camera to a perspective camera?

How can calculate perspective camera parameters from orthographic camera parameters (left, right, top, bottom, near, far)? Specifically I don't know how calculate the FOV for a perspective camera ...
0
votes
1answer
30 views

Calculate camera target

How calculate camera target position, if I have front/back planes, camera transformation matrix and camera lens length?
0
votes
0answers
25 views

Frustum Culling behaves incorrectly with vertex shaded objects

I have a scene with a straight path. It looks something like this: I've also wrote a vertex shader that bends the path. After applying the shader, it looks something like this: If you were to ...
0
votes
0answers
26 views

2D Camera in LWJGL 3

I am trying to implement a simple 2D camera in LWJGL3. The camera has an orthographic projection and can move in 2D space. This is run once at game start-up: GL11.glMatrixMode(GL11.GL_PROJECTION)...
1
vote
1answer
61 views

Unity question: When attaching my custom camera script camera shakes when player starts to move fast [duplicate]

Here is my player code. Rigidbody rb; Vector3 currMovement; public float jumpSpeed = 10; public float moveSpeed = 10; public float rotSpeed = 180; float distToGround; public float smoothTimePos = ...
2
votes
1answer
665 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
1answer
51 views

Unity: When attaching my custom camera script camera shakes when player starts to move fast

Here is my player code. Rigidbody rb; Vector3 currMovement; public float jumpSpeed = 10; public float moveSpeed = 10; public float rotSpeed = 180; float distToGround; public float posSmoothTime = ...
1
vote
1answer
40 views

Damping the Camera “lookAt” rotation

I have created a very short piece of code to make the camera look at a transform object. I locked the rotation of the x and z axis as it is only supposed to rotate on the y axis. I would like to add ...
0
votes
1answer
84 views

Unwanted roll when rotating camera with pitch and yaw

I have a quaternion class implementation, and when I apply this class to my objects all gone right (rotations), but I have a lot of troubles with the camera. I've been searching a lot trying to solved ...
0
votes
0answers
13 views

camera rotation animation problem

I would like to create a 3d person rotation where the camera rotates to the character rotation(follow camera which orbits around the character). It might be possible that the character rotation ...
0
votes
0answers
31 views

Position camera in opengl

I have a camera with a 3D vector that represent the position and a quaternion that represent the camera orientation. I'm trying to rotate and orientate the camera correctly, but I can't. I know that ...
1
vote
1answer
32 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
0answers
16 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
1answer
32 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 ...