0
votes
1answer
48 views

Revert to closest non intersecting position

First, let me start by saying: Please forgive me if this question have already been asked. I've tried to search but didn't find any solution. (It might be due to my lack of terms). I have two ...
1
vote
1answer
380 views

Why is my Texture becoming slower when it approaches it's destination?

I have a texture drawn on screen. Whenever I click on the viewport it remembers its destination and starts moving towards it, until it is there. This is the code I am using therefore: //Check if ...
0
votes
0answers
98 views

Farseer Player Movement and Collision

I have added a video link for any one who whats to see what the problems are by watching the game. I am trying to create a player movement system and there are small problems that I am running into. ...
1
vote
1answer
216 views

Player Movement Systems

I am working on a project were in class my group of students help produce a video game. We are creating a 2D platformer and was trying to make a pixel based system collision witch fell through. Now I ...
0
votes
1answer
89 views

How can I compute a velocity proportional to the difference between two hand positions?

I'm working on a project with the Kinect SDK and XNA 4. I need take the position of the hands and draw a sprite over it. I'm was doing it directly and because of that I get a "trembling hands" effect. ...
0
votes
2answers
132 views

How to avoid character to move when selected

I've got a player Class which can walk to a certain point on the screen when left mouse is pressed: if (mState.LeftButton == ButtonState.Released && oldMouseState.LeftButton == ...
3
votes
1answer
249 views

Implementing smooth 8 directional movement

I have my units that i move around my map with path finding. The units can move in 8 directions, currently i have the units moving around the map with a extremely basic check against the unit's ...
1
vote
2answers
674 views

XNA Using velocity

Previously when making games I have just been using a Vector2 as the sprites position and altering that for movement, i.e.: if(right key pressed) Position.X += movementspeed * gametime...; ...
0
votes
1answer
88 views

Rotating sprites

I'm a beginner at making games, i'm currently only working in 2D using XNA. So far all of my games i've been using the following logic for sprite movement: if(left key pressed) sprite_x_position ...
0
votes
3answers
601 views

How do I move a sprite to the mouse position?

So, I'm trying to make my sprite walk to the X-coordinate of my mouse click. This is my code: currentMouseState = Mouse.GetState(); MouseState mouseState = Mouse.GetState(); ...
1
vote
2answers
260 views

How can I use triangle picking to determine location of a triangle in world space coordinates?

I am trying to implement point and click movement in my game, but at the moment I am stumped about how I can select parts of a mesh for the player to walk to. So what I have done is I have got a ...
5
votes
2answers
272 views

How can I normalize a vector if I am handling movment of each axis seperatley?

I am writing a 2D tile based game engine in XNA, and I've recently fine-tuned my collision detection using the answers provided here and more specifically here. The tile based collision detection now ...
3
votes
1answer
191 views

Figuring out which direction my object is facing on a 2D plane?

My friend and I were messing around in XNA 4.0 making a 2D racing game. Kind of like this one: Ivan “Ironman” Stewart’s Super Off Road. The problem we are having is knowing which direction the car is ...
0
votes
2answers
885 views

How to make a smooth movement in XNA?

I'm trying to make a nice controls for my game, but I can't achieve enough SMOOTHNESS. if (kbState.GetPressedKeys().Length != 0 && _direction != Vector2.Zero) { ...
2
votes
2answers
465 views

How to get the height at a position in a triangle

I have a heightmap, and I store the heights in a giant array. However, when I move, it's quite choppy on the Y-axis, so I need a way to get the height at a certain point in a triangle. I currently ...
6
votes
2answers
439 views

Simulate movement towards the screen in a 2D world

I need to create the illusion of someone kicking a ball to the screen. For that, I have a initial position of the ball (about the middle of the screen), and I put the sprite of the ball scaled at 0.2 ...
0
votes
1answer
666 views

XNA - move camera over tilemap

I am trying to build a game based on Advance Wars in XNA. I am so far where the tiles are placed on the screen, except here starts my problem. During the game, I ofcourse want to move the camera ...
-2
votes
1answer
368 views

C# XNA 2D Multiple boxes collision detection and movement

Hi, I've been making simple game where you shoot boxes that are coming towards you. All game objects are simple rectangles. Now I have problem with collision detection; how to check where the ...
2
votes
1answer
228 views

Movement on the X an Z axis are combined?

This is probably a stupid question, but I'm trying to simply move a 3D object up, down, left, and right (Not forward or backward). The Y axis works fine, but when I increment the object's X position, ...
0
votes
2answers
276 views

XNA move from start position to target position exactly in 3D

If I have a list of positions that map out a path a character should follow. What would be the best way to move at a constant speed to each position making sure the character lands exactly at each ...
1
vote
2answers
469 views

Circular movement - eliminating speed ups near Y = 0

I have a basic algorithm to rotate an enemy around a 200 unit radius circle with center 0. This is how I'm achieving that: if (position.Y <= 0 && position.X > -200) { position.X -= ...
1
vote
1answer
199 views

How would a sprite spawn more sprites under themself every second?

I am making a snake game and am having trouble to make the snake go longer, at the moment when I run the program, I just have the snake head eating apples. But I want the snake head(30x30) to spawn ...
1
vote
3answers
1k views

XNA create differences in enemies

I created an enemy class for my game. It works well, except for one dilemma. When I spawn more than one enemy, eventually they begin to "overlap" and look like one enemy. I was wondering if anyone had ...
1
vote
4answers
2k views

Rotating a model AND translating it forward in XNA

I have this enemy class, and I want it to 1) Spawn at a certain place Vector3 pos 2) Rotate to face my player position 3) Move forward As this code is now, it will appear at it's specified place: ...
5
votes
3answers
538 views

Random monsters move in-sync instead of individually

I am making a game in which monsters spawn randomly and begin to move around randomly. I am fairly new at programming but not at game development. Through using a few tutorials I was able to make 1 ...
3
votes
1answer
602 views

XNA 2D Board game - trouble with the cursor

I just have started making a simple 2D board game using XNA, but I got stuck at the movement of the cursor. This is my problem: I have a 10x10 table on with I should use a cursor to navigate. I ...
2
votes
1answer
1k views

2D Topdown Shooter - Player Movement Relative to Mouse

I'm trying to make a topdown 2D space game for my school project. I'm almost done but I just want to add a few little things to make the game more fun to play. if (keystate.IsKeyDown(Keys.W)) ...
5
votes
1answer
584 views

How can I implement view wobble when my player is running?

I'm creating a FPS in XNA. So far its' going great. What I'm looking at doing is replicating the camera movements that you see in Modern Warfare. So, if you are walking the camera stays pretty ...
-2
votes
2answers
408 views

Move camera on X and Z only

How would you implement movement on a camera in order to always move it on X and Z coordinates, and if the camera has pitch yaw or roll it still moves only in those coordinates and doesn't fly up?
1
vote
1answer
209 views

I need help with specific types of movement

I'm adding movable crates to my game and I need some help with my movement code. The way I've set up my movement code the crate's X and Y are moved according to a vector2 unless it hits a wall. Here's ...
4
votes
1answer
588 views

Tried and true basic movement physics (jumping, not walking through stuff)?

If I sat down long enough, I'm sure I could make this happen, but I don't want to reinvent the wheel if I don't have to, especially if XNA has patterns in place for doing this. For now, I'm working ...
0
votes
2answers
649 views

How do i get my tilemap to move at the same speed as my character

I have a little problem in my solution, i'm trying to make a pretty big map for the players to walk around in. I decided to use a tile-engine, but when I move my character it moves faster than my ...
12
votes
4answers
4k views

Curved movement between two points

What is a good technique to enable an object to move between to points in a nice curved motion? The end position could also be in motion, such as the trajectory of a homing missile.
5
votes
2answers
3k views

Oscillating Sprite Movement in XNA

I'm working on a 2d game and am looking to make a sprite move horizontally across the screen in XNA while oscillating vertically (basically I want the movement to look like a sin wave). Currently for ...
1
vote
2answers
623 views

XNA: How to make the Vaus Spacecraft move left and right on directional keys pressed?

I'm currently learning XNA per suggestion from this question's accepted answer: Where to start writing games, any tutorials or the like? I have then installed everything to get ready to work with XNA ...
8
votes
2answers
14k views

Moving a sprite in XNA/C#, using vectors

I'm currently looking into XNA game development with the C# language. I have two classes: the main game handler and a "sprite" class. Following is some basic pseudo-code which I hope adequately ...
22
votes
4answers
4k views

Top Down RPG Movement w/ Correction?

I would hope that we have all played Zelda: A Link to the Past, please correct me if I'm wrong, but I want to emulate that kind of 2D, top-down character movement with a touch of correction. It has ...
3
votes
4answers
3k views

Multiple Key Presses in XNA?

I'm actually trying to do something fairly simple. I cannot get multiple key presses to work in XNA. I've tried the following pieces of code. else if (keyboardState.IsKeyDown(Keys.Down) && ...