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
votes
1answer
26 views

UnityEngine.Camera doesn't contain definition for “active”

So I'm just trying to create a simple script in C# which will allow me to switch between two cameras, named Camera1 and Camera2. But I have run into the error UnityEngine.Camera doesn't contain ...
0
votes
3answers
60 views

Rotating camera based on player's rotation

I'm trying to have a camera rotate mirror the player's rotation, however, this isn't happening and the camera isn't rotating at all. Can anyone explain what I'm doing wrong and how to fix it? public ...
0
votes
2answers
33 views

Control Camera with gyroscope and place a gameobject always in front of it

Actually I have came here after searching from past 5-6 hours. Actually I am making a small game in which I have a camera and a gameobject. The Game Object is place in the center of the scene at 0,0,0 ...
0
votes
1answer
21 views

Libgdx OrthographicCamera culling problem with zooming

When I set zoom on an orthographic camera to anything above 1 I get a strange black border on the bottom of the screen. I suspect that this might be some sort of culling problem. I use a viewport to ...
0
votes
2answers
38 views

glm::perspective isn't working?

So I'm learning how to make games and program, and while trying to setup a projection camera using GLM in GFLW, this line of code refuses to work and I can't figuire out why. The code is in the image ...
0
votes
0answers
61 views

Constructing FPS camera transformation matrix using yaw and pitch

I'm trying to construct a FPS view matrix for my OpenGL renderer using yaw and pitch angles instead of the typical LookAt view matrix. I'm using the standard OpenGL coordiante, right-handed system ...
0
votes
2answers
27 views

GL how to look at the center of the viewport

I'm using GLFW3 and OpenGL to visualize measurements from an IMU that I have. I've gotten the simple cube example working and I can rotate it successfully with quaternions that I've input. However ...
1
vote
0answers
22 views

LibGDX limit the PerspectiveCamera for a FPS view

I'm using LibGDX and I'm trying to implement a FPS camera into my game. I'm not using the FirstPersonCameraController for multiple reasons: I don't want to touch to roll (only yaw and pitch), with ...
0
votes
1answer
25 views

Questions on camera view and buffer updates

I am quite confused with how the game engine handles camera view in DirectX. I know all the matrix stuffs, but where the projection matrix goes finally seems rarely mentioned. I looked up in the ...
0
votes
1answer
23 views

Xna c# picking model with Ray mouse cursor select the wrong model

i made a small 3D game and i just try to apply a basic sample from here : http://rbwhitaker.wikidot.com/picking for picking model by the mouse cursor. For that i use the Ray object and check if some ...
0
votes
0answers
18 views

Change Post Process on Camera

Using unreal engine 4, and attempting to change the post process settings on a camera attached to my player character. I can do this in blueprint, but was wondering how it was done in c++. So far in ...
0
votes
0answers
21 views

Depth test against culled objects

I have two cameras rendering 2 sets of geometry. (Achieved by setting clipping plane) The first set contains two planes, and the second set contains a single plane. Each set sits on its own layer. (...
1
vote
1answer
80 views

2d Tile Movement and Camera

Let's imagine we have a 60x60 grid (where a Tile is 64x64px). Within the viewport there should be 10 tiles. The player object is 32x32px. To have smooth movement, I have to take delta time in ...
0
votes
1answer
49 views

Unity2D - Horizontal Scaling to Support Various Aspect Ratios?

I am trying to work out how to support various resolutions for my Android game. I have come up with a solution, but do not know how to implement it. Automatically, I am told that Unity vertically ...
-1
votes
1answer
73 views

Camera not working in a Game Maker mod I am creating

I wrote an object, in Game Maker. My problem is that the camera appears to be nonexistent. It does not follow the player, and from the perspective it displays on the screen, I believe I simply do not ...
3
votes
0answers
53 views

Problem with rendering in my game when using a following camera

I've got an issue while rendering 2d images with my own simple 2D camera object. First my setup: a star initial position 0,0 a planet circles the star initial position 300, 300, moves at a radius of ...
0
votes
0answers
30 views

XNA - 2D camera orbit around sprite

OK, I have a 2d sprite in a scene and I would like to know the theory behind the camera orbiting around it with an analog stick. I know the basic code to get the input from the gamepad, but I'm having ...
0
votes
2answers
44 views

Unity turn the camera when the player turns

I have a 3rd person view of my player. I wish my camera to follow the player both when he moves and when he rotates. So far i have the movement correct: public class CameraController : ...
0
votes
0answers
22 views

Libdgx Sub-Pixel Camera Scrolling

I read this post about sub-pixel rendering: http://code-disaster.com/2016/02/subpixel-perfect-smooth-scrolling.html The idea is you draw your game to a FrameBuffer at a resolution like 320x180 and ...
0
votes
2answers
65 views

How To Have My Character Turn When The Camera View Moves

So I have recently finished animating my character, having it move with key presses and have applied a camera to it. But I am stumped on how to have the player turn when the camera view moves, and ...
0
votes
0answers
38 views

Pygame camera scrolling

Right, so I'm trying to develop a Fire Emblem-style game, topdown view of a square-grid map using the pygame library. I'm trying to implement a way for the camera to scroll when you hit the edges, ...
0
votes
1answer
31 views

Unity Camera - Clamping when Zoom changes?

I've got a basic camera I am working on for a 2D game that moves with the player and clamps to the area of the map. To the basics I've introduced a combination of player and eventual height-based zoom ...
1
vote
1answer
73 views

How do I make a quake-style camera tilt in Unity?

I want to make a retro-styled game with a modern look to it, and to do so I wish to make a quake-styled camera tilt. By that I mean when moving sideways the FPS Camera tilts a little bit, and the ...
1
vote
1answer
41 views

Unity - Static Camera Perspective, Walls Obscure Player

Pretty simple and common problem here. The world I'm designing is fully explorable, no invisible walls or tricks. It's presented as a single seamless area, a School complex with 9 buildings, some of ...
0
votes
0answers
145 views

How to scale Textures in libgdx?

I am playing with creating a simulation of a solar system, the coordinates for my object obviously get really huge. I started off with an example code from libgdx wiki about an Orthographic camera. ...
1
vote
1answer
32 views

Pitch/Yaw in circle causes undesired Tilt [duplicate]

I've made my own Camera object, with a forward vector as well as a up vector. I happen to be programming in Android using OpenGL ES 2.0 but I think this question is relevant to all frameworks, it ...
0
votes
0answers
58 views

Calculate object position irrespective of camera orientation in augmented reality

Recently I am working on a game in iOS and trying to get a feature like Pokemon Go game where an object stays in a specific position and trying to find this object by camera view. So, I read some ...
0
votes
0answers
52 views

Line not showing up on render texture image

I have my first functioning weapon in my game, a laser beam. The game is centred around ship-to-ship combat, and the layout is like FTL's - a view of your ship, and a smaller window showing the enemy ...
0
votes
2answers
65 views

How should I make a jump-timing game's character static on screen?

I decided to learn Pygame and try to make a simple game inspired by Google's T-rex jump game. However, I stumbled upon a problem that I can not seem to figure out: How can I implement a scroller/...
0
votes
0answers
26 views

Camera x, y, scale screen to World coordinates

I have the Camera with properties: x, y and scale. Scale is what I use to the whole world as a scale transformation so every character has smaller size as the scale decreases over the time (something ...
0
votes
2answers
76 views

Unity2D: How to destroy spawned object once it exit out of camera's view?

I'm trying to destroy spawned objects once it exit out of camera view automatically/straight away. You see I'm trying to make a flappy brids type of game but things also comes in from the bottom and ...
0
votes
1answer
149 views

Can we measure the distance between and AR marker and camera?

I'm in the middle of developing a game in Augmented Reality using Unity and ARToolkit plugin. I wanted to measure the approximate distance between the AR marker and the position of camera. Can anyone ...
1
vote
1answer
100 views

Camera rotation in 4D

What practical choices do I have in order to rotate a camera in 4D space? I would like to make it as intuitive as possible. A camera in 3D space can be represented by a point where it is located the ...
0
votes
2answers
48 views

Unity2D: Delete spawn objects once it exits camera's view

does anyone know how to delete/destoy a spawn object when it exit out of the camera view. I tried using: void OnBecameVisible() { Destroy (gameObject); } But it didn't work. Maybe I'm ...
0
votes
1answer
91 views

Why does my mesh disappear from certain angles?

I'm trying to construct a hexagonal prism from vertices for my turn-based strategy game. This is my first time working with meshes and I have been following this tutorial. The problem I am having is ...
0
votes
2answers
81 views

How scroll camera smoothly?

I have such screen: very long world which I draw on stage and I need to scroll it. Now I move my camera in touchDrag() method. But I want to move my camera like I scroll it. E.g. I fling screen fast ...
1
vote
1answer
61 views

Camera follow behind a Model

I am trying to learn about the Camera in a 3D space and wanted to 3rd person type of camera. Right now, I directly control my camera and it doesn't follow anything. It works like a first-person camera....
0
votes
1answer
59 views

A way to make camera get distance from the player when the player gains velocity?

I'm building upon roll a ball example and I'm trying to make the camera gain distance from the player, when the player starts moving (gaining velocity). i came up with this, but it feels clunky and ...
0
votes
0answers
34 views

Inverse zoom in/out (scaling) of AR 3D model using ARToolkit for Unity5

I have done a AR project using ARToolkit for Unity. It works fine but the problem I'm trying to solve here is to inverse the scaling on 3D model. Right now when you take camera further away from the ...
1
vote
1answer
167 views

libGDX - Why do I have to use camera.setToOrtho what does it do?

I am very confused about camera matrices and I don't know where to start my studying. Maybe I have to study OpenGL, but I don't know C++ ... Ok so I have a camera, Box2d world and a Box2d body. ...
1
vote
0answers
68 views

How to achieve the top-down (oblique) projection of textures using an OrthographicCamera?

This question is related to (How to calculate the initial velocity of projectile motion by a given distance and angle from point A to B) question. Details In the below image is the graphical ...
0
votes
1answer
109 views

[Unity][C#] Coding Better Camera Recoil

I am trying to get a good camera recoil system in Unity, but what I have tried so far doesn't seem to look very good. My current method, is using Quaternion.Lerp. With the way I have my shooting ...
0
votes
0answers
26 views

How to locate camera facing down with gluLookAt equivalent?

My world is a field. The coordinates and the axis are described in the image below: I want to locate a camera above the field, at location C=(W/2,H/2,-Z1), facing down. The extrinsic matrix RT that I ...
1
vote
0answers
24 views

Let one camera frustum intersect another's

I am currently struggling with the issue of combining two camera's render outputs. One camera renders orthographic 2D objects (e.g. facing the X/Y plane), the other renders 3D objects overlaid on top ...
2
votes
1answer
39 views

When scaling the camera with the player, how can I make it more noticeable?

I am making a game where you play as fish. When you eat food you become larger. I am counting the camera scale as follows: camera.scale = (player.originalWidth / player.width) Then I apply it as a ...
3
votes
2answers
196 views

Camera Preview while the camera is not selected

When I select the Camera object, I see the border-lines, the near clipping Plane and the camera Preview. Now I would like to see all those things when I select another GameObject (still the lines ...
3
votes
1answer
86 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
72 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 ...
-5
votes
1answer
81 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).
3
votes
1answer
170 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 ...