0
votes
2answers
69 views

Player's camera, how to obtain smooth movement

In a 2D platformer, I have a player that can move both horizontally and vertically. I also have a camera that moves in relation to player. In every update I do this: public void RepositionCamera() ...
0
votes
1answer
170 views

Obtain rectangle indicating 2D world space camera can see

I have a 2D tile based game in XNA, with a moveable camera that can scroll around and zoom. I'm trying to obtain a rectangle which indicates the area, in world space, that my camera is looking at, so ...
0
votes
1answer
252 views

XNA Arcball and moving model - the model is altered instead of the camera

I'm trying to implement an arcball type camera, I've got all controls working very nicely. I can rotate the X/Y axis with my mouse and zoom in and out with the Z/X keys. The problem is, that the ...
0
votes
1answer
177 views

First person shooter camera movement

I am making an FPS in XNA. I cannot seem to make a FPS camera that I can move Forward, Back, Side to Side using the keyboard. How do I do that?
1
vote
3answers
64 views

2D Camera doesn't work when I have split my code into DrawableComponents

I have the following camera written: public class Camera { public Vector2 Position; Viewport Viewport; public Matrix Transformation { get { return ...
0
votes
1answer
125 views

XNA Camera Positioning All Wrong

I've been working in 3DSMax for years now and decided to give XNA 4.0 a try. I've got the majority of it working, however the camera is being a pain to me and I can't discern what's gone wrong. I ...
0
votes
1answer
99 views

A view and projection matrix oddity?

I have a bit of a dilemma ... So i setup my scene how I want it with some bits in it and now I want to move all my camera related code in to a camera class however doing so is proving to be a pain in ...
1
vote
1answer
709 views

XNA - moving the 3rd person camera

I'm having following problem: Can't set my camera to follow object from behind and rotate when I use left/right arrow. I've tried different tutorial and examples but it still doesn't work for me. ...
4
votes
1answer
137 views

Why does CameraZ=0 result in no render?

I am trying to draw simple model, but I am experiencing strange error. When I use this View matrix: Matrix.CreateLookAt(new Vector3(0, 200, 1), new Vector3(0, 0, 0), Vector3.Up); my model is drawn ...
2
votes
1answer
382 views

C# 2D Camera Max Zoom

I have a simple ship sprite moving around the screen along with a 2D Camera. I have zooming in and out working, however when I zoom out it goes past the world bounds and has the cornflower blue ...
4
votes
1answer
344 views

How do I calculate the boundary of the game window after transforming the view?

My Camera class handles zoom, rotation, and of course panning. It's invoked through SpriteBatch.Begin, like so many other XNA 2D camera classes. It calculates the view Matrix like so: public Matrix ...
1
vote
1answer
457 views

xna orbit camera troubles

I have a Model named cube to which I load in LoadContent(): cube = Content.Load<Model>("untitled");. In the Draw Method I call DrawModel: private void DrawModel(Model m, Matrix world) ...
2
votes
2answers
1k views

XNA Camera 2D confusion

I have followed the tutorial at http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/ to implement my 2D camera and everything works just fine. However this leaves me confused. ...
1
vote
0answers
637 views

Picking 3D object with Mouse when using Camera Zooming in XNA 4.0

I've tried to figure out how to do picking with the mouse, and things work great when zoomed in all the way with the camera (Third Person Camera). And it works perfectly when using First Person ...
4
votes
1answer
733 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 ...
2
votes
1answer
528 views

Smooth Camera Rotation around 90 degrees

I'm developing a third person 3D platformer in XNA. My problem is when I try to rotate the camera around the player. I would like to rotate (and animate) the camera 90 degrees around the player. So ...
5
votes
3answers
2k views

XNA 4.0: 2D Camera Y and X are going in wrong direction

I asked this question on stackoverflow but assumed this might be a better area to ask it as well for a more informed answer. My problem is that I am trying to create a camera class and have it so ...