Game worlds are viewed from a camera, which is the viewpoint from which the game world is observed from.
1
vote
0answers
20 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
38 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
19 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
36 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
27 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
38 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, ...
0
votes
0answers
28 views
WebCamTexture.width and height returning 16,16 unless reinitialized
I am trying to store a picture from a camera with WebCamTexture. The function Savepicture(string path) uses a Texture2D to set pixels retrieved from the WebCamTexture class field, I end up getting a ...
1
vote
1answer
26 views
6DOF camera: inverted yaw and roll when orientation changes
Whenever I change the orientation of the camera, yaw and roll become inverted (or correct); the strafing, movement and pitch do remain correct however.
Can you tell what is causing this and how to ...
0
votes
2answers
65 views
A 2D Camera Follow Script That Does Not Rotate?
I am attempting to make a 2D racing game. So far I have a player car (sprite) and a main camera.
I would like to know how to make the main camera follow the player car while still showing signs of ...
0
votes
1answer
36 views
Given a constant rotation and target point, find position so that point will be in camera center
Given a fixed rotation and a target "center" point, how to I find the position the camera should be in so that that point is the center? LookAt changes the rotation keeping the position constant. ...
0
votes
1answer
23 views
LibGDX full screen display mode and camera resize
I'm creating a simple 2D platformer and I have problem with my camera y position when I enter full screen mode. But first here's my code
screenY = Gdx.graphics.getHeight();
public void ...
0
votes
0answers
56 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
41 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
52 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 ...
0
votes
0answers
27 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
53 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
127 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
51 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
116 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
36 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
70 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
60 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
79 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
29 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
42 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
84 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
82 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
29 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
46 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
403 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
37 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
46 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
145 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
47 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 = ...
5
votes
1answer
133 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
53 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 ...
2
votes
0answers
68 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
40 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
88 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
125 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
177 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
69 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
328 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
118 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
43 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
180 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
41 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
284 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 ...