The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
39 views

XNA: How do I match Spritebatch View/Projection Matrices with BasicEffect Matrices?

I'm rendering a bunch of 2D content using SpriteBatches to a default XNA viewport. A simple 2D camera is used to move around the scene, which generates a transformation matrix passed to each ...
0
votes
0answers
19 views

How to switch a view off and on again while retaining key event input

I have a couple of views in my app - my main activity and a separate activity which is used for high scores. What I need to know is how I can 'get rid' of one of the views temporarily, and then bring ...
1
vote
1answer
60 views

projection / view matrix: the object is bigger than it should and depth does not affect vertices [closed]

I'm currently trying to write a C 3D software rendering engine from scratch just for fun and to have an insight on what OpenGL does behind the scene and what 90's programmers had to do on DOS. I have ...
1
vote
1answer
54 views

What is the correct way to seperate (react) view from state?

I would like to know the correct implementation to declare game logic and view logic: I see 3 ways of implementing this: 1.Storing (eg writing preprocessing to store the change to a property) ...
-3
votes
1answer
121 views

GLSL does weird things to my view matrix [closed]

uniform mat4 model; uniform mat4 view; varying vec4 vColor; void main(){ gl_TexCoord[0] = gl_MultiTexCoord0; gl_Position = view * model * gl_Vertex; vColor = gl_Color; if(view * ...
0
votes
0answers
64 views

W2S, worldtoscreen from Projection Matrix and View Matrix

After a couple of days of tremendous trial and error coding, I must give up: I have a simple 3d program that I'm adding a visual layer to. Basically, I want to draw 2d icons and text over 3d objects ...
14
votes
4answers
405 views

What would a “2nd person” viewpoint consist of?

Traditional narratives have one of three viewpoints: First person (I fought the monster) Second person (You fought the monster) Third person (He/She/It fought the monster) First and Third person ...
1
vote
1answer
209 views

HLSL What you get when you subtract world position from InvertViewProjection.Translation?

In one of NVIDIA's Vertex shaders (the metal one) I found the following code: // transform object normals, tangents, & binormals to world-space: float4x4 WorldITXf : WorldInverseTranspose < ...
0
votes
1answer
653 views

View Matrix from Camera in Unity Script

I am looking to get a Camera component's "view" matrix in a script. I see that I can get the projection matrix using Camera.projectionMatrix, but I don't see a Camera.viewMatrix property... I want ...
3
votes
1answer
227 views

Shear transformation in the projection matrix?

I am trying to understand what the shear transformation (l+r/r-l & b+t/t-b) is actually doing in the projection matrix? The only thing I got till now is headache :) Can you please help?
0
votes
2answers
6k views

onTouchEvent only working for one view within activity

I have a parent Activity which contains 2 views. One view is a custom view class, where I am overriding the onDraw method. This view contains an onTouchEvent function, which is checking for user ...
1
vote
1answer
2k views

Show view over existing view in same activity

I am newbie Android developer, and I am starting out with a simple Sudoku game. The problem I am facing right now is that I have my game showing on a dedicated Activity, which is displaying a custom ...
1
vote
2answers
333 views

Top Down bounds of vision

Obviously in a first person view point the player sees only what's in front of them (with the exception of radars and rearview mirrors, etc). My game has a top down perspective, but I still want to ...
2
votes
1answer
111 views

Model View Controller linking dynamic model to view

I currently an implementing a game roughly using a model-view-controller setup. A single game controller instantiates a model and view. The model and view then instantiate child models and views, ...
2
votes
0answers
238 views

Camera - View matrix in Android + openGLES 2

I am trying to use the touch screen on the tablet to control my camera movements and generate the view matrix accordingly. I get the x and y coordinates of the screen and after doing some sanity ...
11
votes
4answers
2k views

Why is Y up in many Games?

I learned at school that the z-axis is up. It is the same in modeling software like Blender. However in many games the y-axis is up. What is reason?
0
votes
1answer
264 views

Y Axis inverted on vertex output

I've got my project running and somehow it seems my vertex y components are inverted. 10 in the positive on Y goes down and 10 negative on the Y axis goes up. I can't find anything with the ...
55
votes
9answers
17k views

Why do we move the world instead of the camera?

I heard that in an OpenGL game what we do to let the player move is not to move the camera but to move the whole world around. For example here is an extract of this tutorial: OpenGL View matrix ...
1
vote
1answer
2k views

How to switch between views in android?

I've tried several methods to switch between two views in my program. I've tried creating a new thread then have the view run for 5 seconds before creating intent to start my main activity. This is ...
1
vote
2answers
248 views

Matrix camera, movement concept

Someone told me that the movement concept in my 2D game is bad. When left or right arrow is pressed I'm scrolling the background which makes you feel that player avatar is moving (the avatar's ...
1
vote
1answer
359 views

UIView with IrrlichtScene - iOS

i have a UIViewController in a Storyboard and want to draw a IrrlichtScene in this View Controller. My Code: WWSViewController.h #import <UIKit/UIKit.h> @interface WWSViewController : ...
2
votes
1answer
291 views

Implementing Circular Sprite Masks

So I've been scouring the interwebs for a couple of days with regards to how to implement sprite masking in XNA 4 and C#. Coming from a pet project I did in Flash, this was pretty easy as masks are ...
11
votes
1answer
1k views

How to Simulate Height in a Tiled Top-Down Game

How can I simulate height in a top-down tiled 2D game? One way I thought was to make tiles which are supposed to be higher brighter, but I was wondering if there was a standard or better ...
1
vote
1answer
1k views

Android-Handling screen clicks for dynamically moving objects in a view

I have a kind of broad question to ask but I have to start some where so.....What is the best way to handle onscreen clicks for moving objects being drawn on a canvas in a view. Im registering the ...
1
vote
1answer
423 views

Strange 3D game engine camera with X,Y,Zoom instead of X,Y,Z

I'm using a 3D game engine, that uses a 4x4 matrix to modify the camera projection, in this format: r r r x r r r y r r r z - - - zoom Strangely though, the camera does not respond to the Z ...
4
votes
1answer
740 views

How can I achieve a zoom-like camera effect?

I have a top down 3D camera: view = Matrix.CreateLookAt(new Vector3(0,0,20), Vector3.Zero, Vector3.Up); Now I want to achieve the effect like when I zoom in the scene and only show a section at the ...
5
votes
3answers
455 views

How can I calculate where my camera can be to avoid showing something outside a region?

I have a landscape model, which goes from the coordinate -45, -45 to 90, 90. The edge of the model just cuts off and i would like to somehow stop the screen from ever passing these points. Basically ...
3
votes
1answer
1k views

Can a 4x4 matrix describe a camera's perspective?

I'm working with a closed-source 3D engine, and it only allows you to set the view projection via a 4x4 matrix. Can this matrix describe the camera's translation, rotation & perspective? I turned ...