0
votes
1answer
76 views

2D terrain with midpoint displacement and collision

I followed this theory Here to implement a simple scrolling 2D terrain for my running game. I am used to dealing with collision via a tile system but am looking for a good theory on how to perform ...
2
votes
2answers
136 views

Pathplanning A* Getting stuck in wall

I'm having a problem with my pathplanning. I can plan a path and make my character follow it, that's not a problem but then i plan a path around a wall it takes the shortest way as A* suggests, which ...
1
vote
3answers
111 views

Removing something on Collision?

I have my collision detection code working so how would I tell my HealthPickup to disappear when my Player collides with it? I haven't played around with it yet but I think I may have to somehow ...
2
votes
2answers
153 views

XNA - Making 2D Hexagons Connect With Each Other

Hey so I'm working on a top-down 2D strategy game in XNA, and the tiles are hexagons. I can't have a grid because of the game mechanics, so everything has its own location, and every tile object is ...
1
vote
1answer
67 views

Point in Polygon, Ray Method: ending infinite line

Having a bit of trouble with point in polygon collision detection using the ray method i.e. http://en.wikipedia.org/wiki/Point_in_polygon My problem is I need to give an end to the infinite line ...
9
votes
4answers
621 views

Make the player run onto stairs smoothly

I have a 2D Platform game, where the player Always runs to the right, but the terrain isn't Always horizontal. Example: I implemented a bounding-box collision system that just checks for ...
0
votes
0answers
47 views

Trying to get an object to move back and forth on collision between two collidable objects

Im trying to get a box object to hit a collidable wall on the right and when it hits it move left and hit the left wall and switch back and so on and so forth. Im having trouble with this because ...
0
votes
1answer
47 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
0answers
51 views

Setting up 3d Collision for Primitive shapes

Im having some trouble understanding how to set up collision detection between my first person camera and my primitive shapes which are made using the vertex buffer. Do i give my camera a boundingBox ...
0
votes
1answer
76 views

How to retrieve a cube collision by faces

I work for a while on a minecraft game (voxel). I am front a problem for a long time about the collision detection. I want recover the cubes collision from my highlighted black's cube like on the ...
3
votes
2answers
499 views

How can I tell what a rectangle intersects with?

I understand XNA's Rectangle class is rather limited, but surely there is a way to tell what a Rectangle is intersecting with? If I had Rectangle boundingBox = new Rectangle(stuff here); how would I ...
0
votes
1answer
69 views

How can I determine if an object hit the top of a tile rectangle in MonoGame? [duplicate]

I've been implementing an AI system in my 2D game using MonoGame. In some situations when a collision between two objects occurs, I need the NPC to move in different directions depending on the ...
2
votes
2answers
105 views

Sweep collision between two moving spheres?

Say I have a scenario like this: Here I got two spheres (sphere A and B) that moves from on spot to another during a frame. How can I predict where these two collide if they collide at all? In ...
0
votes
0answers
75 views

Precalculating timespan of bullet collision on cubic bezier curve circles?

I'm fairly new to game logics, C#/XNA (The language/library of choice) and bezier curves in general, and is stuck in my current project. I'm going to try to explain as thoroughly as I can what the ...
0
votes
1answer
218 views

How does Raycasting work in XNA Farseer and player collision?

Wanting to know how to figure out if player's bottom is colliding with object so that I could allow the player to jump. I was trying to use OnCollision but was referred to ray-casting, I looked ...
0
votes
0answers
94 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. ...
0
votes
0answers
128 views

Non-rectangular hitbox methods in XNA

I'm creating a 2D top-down RPG, and many of my buildings/scenery have non-rectangular corners to the textures. Does anyone know a good way to create circular/triangular/polygonal hitboxes, or is too ...
1
vote
1answer
212 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
0answers
90 views

Smooth circular collisions with edges/collision boxes [C# + XNA]

So, me and a friend are working on our top-down perspective 2D game, and have come to work on perfecting our collisions. In its current state our player sprite is colliding with walls, but is ...
1
vote
1answer
268 views

Sprite collision with color?

Is this possible? To elaborate, I am making a PacMan offshoot. Essentially it is a "zoomed in" version of the game, but the board is randomly generated. I have 11 .png files each to be used as a ...
1
vote
1answer
48 views

A Sensor’s ContactList Keeps Old / Ignores New Contacts, When That Contact Is still

Okay this is a hard one to explain so I’ll try my best. Basically every time my enemy class updates, it runs a SightCone Sensor Contact List test, so this is every single frame it checks for all the ...
0
votes
1answer
98 views

How to loop through objects in class (XNA)? [closed]

In my game I have an Enemy class, and in that I have a constructor which I use to make Enemy objects. How do I add all Enemy objects to a list or loop through all of them using a foreach loop? I ...
0
votes
1answer
224 views

XNA 3D Unable to Position Bounding Sphere

I have a collision method which seems like it would work, and it does, but the bounding sphere is always at 0, 0, 0. How do I fix this? Any more code and or details are avaliable upon request. Any ...
0
votes
1answer
102 views

AABB SAT code detects collision wrongly [closed]

I've been having trouble getting my SAT code working using AABBs, and I've been trying to find a solution but, I'm scratching my head. For some reason, it detects collisions very wrongly, as shown by ...
0
votes
2answers
132 views

Creating a collision shape for a complex model

I'm currently creating the collision system for my 3D XNA game. To check collisions with models (especially complex ones) like trees or other plants, I thought about rendering a low poly version of ...
1
vote
3answers
195 views

Lag created when detecting collision

I'm fairly new to gamedev and have encountered a problem with the collision detection system. The collision is essentially worked out like this: for (int x = 0; x < playerprojectiles.Count; x++) ...
7
votes
3answers
601 views

Reusable top-down collision class

I've recently picked up monogame and am working on a simple top down game to get me started and learn the basics. I've got the movement and the rotation to follow the mouse sorted out but I'm stuck ...
0
votes
1answer
95 views

Rectangle collision doesn't work on WP 8

Collision detection is not working correctly when my 64x64 pixel block touches a bigger block. The big(rect2big) block measures 128x128 pixel. The falling block should change it's color to black when ...
0
votes
1answer
194 views

Collision Issues

When I run the collision code, there are no errors, but when I shoot the enemy nothing happens..... Any problems that are blindingly obvious? Class Level Variables public Model model { get; ...
-1
votes
1answer
703 views

Xna tile map collision

I finally found a tutorial on tile maps and loading them in from a file that I understand (http://circlessuck.blogspot.co.uk/2012/09/xna-tutorial-basic-tile-engine-part-2.html), however the tutorial ...
-1
votes
1answer
228 views

3d Wall sliding collision

I'm working on collision for walls in my game and the way I currently have it I get stuck walking into a wall. I'm trying to make my character slide on the walls but still collide. My character moves ...
1
vote
0answers
281 views

XNA Monogame How to handle tile collision [closed]

I am working on a simple XNA side scrolling game as a learning exercise. It works by creating a level object which creates a matrix of tiles based on a map within a text file. The tiles are then drawn ...
3
votes
1answer
176 views

Why would a Bounding Sphere and BoundingBox not intersect (when they should)?

I have a bounding sphere and a bounding box that should be intersecting, however, Intersects(...) is returning false. For example, the following returns false: new BoundingSphere(new Vector3(500, ...
3
votes
1answer
114 views

How to determine depth of a pixel perfect collision

I am trying to figure out how to determine the depth of a pixel perfect collision in XNA. I want to know the depth in order to be able to use it in my collision response. At the moment I have the ...
3
votes
1answer
144 views

How do you get the collision plane when using AABBs? [duplicate]

My collision detection initially seemed to work well enough, but my answer to this question shows that I have went with SAT testing now instead. My goal was to find the plane at which to slide the ...
1
vote
0answers
141 views

scale rotating boundingbox

I want to use basic rectangular collision detection. I have a rotating sprite and a method that calculates the bounding box every time in the Update() method. I simply check for intersection between ...
0
votes
1answer
507 views

Creating 2D polygons in XNA

I am trying to implement collisions using the separating axis theorem. However All I have ever used in terms of polygons is the Rectangle class included in XNA already. How can I make multi-sided ...
0
votes
2answers
465 views

C# XNA AABB vs AABB collision resolution, AABBs ghost through each other

I've been learning a bit of collision resolution through a tutorial here and I can't seem to get the AABBvsAABB resolution working, I have CirclevsCircle and AABBvsCircle resolution working with the ...
4
votes
3answers
224 views

XNA Collision is quircky/wobbly, how to improve?

I am sorry if this was already answered but I couldn't find the answer. So I am doing a tile based platformer and when I was making collision I had quiet a struggle I looked here and googled for ...
1
vote
1answer
136 views

Rectangle collision is not working correctly [closed]

I have difficulties with the rectangle collision. My character can go through the right side and through the bottom of each platform rectangle. I guess their is a mathematical problem with the ...
0
votes
1answer
197 views

Bounding Boxes and XNA

So heres some straight up code for you: BoundingBox b = new BoundingBox( Vector3.Up + Vector3.Right + Vector3.Forward, Vector3.Down + Vector3.Backward + Vector3.Left); BoundingBox bb = new ...
1
vote
1answer
168 views

Recommended collision response needed [closed]

In my game, I have Player class Enemy class Wall class GameComponents class ( Which is the base class for Player, Enemy and Wall) The rules are Enemy chase Player, if collided with Walls, ...
1
vote
1answer
159 views

How can I make it so that my player object doesn't penetrate world collision when I'm holding down movement keys in that direction?

Right now I have a player object and an obstacle, both with bounding box rectangles around them. The issue is that when my player runs into this obstacle, as long as I'm holding down the movement key, ...
-1
votes
2answers
134 views

Jittery effects with collisions [closed]

I have been having some problems with my coding lately. I am trying to create a platform-based game and I have been having some troubles. A friend of mine said that some update functions are out of ...
3
votes
2answers
375 views

Collision Detection - Slide Around Sprite

I'm creating an RPG using XNA/C# and am trying to add some complicated collision detection code. I have the playable character 'Wizard' and when it collides with something, a method gets called in his ...
2
votes
2answers
226 views

Collision detection against large arbitrarily shaped textures

What is the most effecient way to do collision detection on strangely shaped textures in XNA? Here is an example texture: As you can see, it is far from a perfect square. I want the player to ...
1
vote
1answer
385 views

I'm having trouble with collision detection in XNA [closed]

I've written a tile editor and game in XNA, with velocities and gravity, and am having trouble with some of my collision detection things. It works okay, but seems to glitch between just inside and ...
0
votes
1answer
77 views

Controls become inverted after a collision

I'm just prototyping a simple project. I'm moving a sprite on screen using the Xbox gamepad: public override void Update(GameTime gameTime) { gamePad = GamePad.GetState(PlayerIndex.One); ...
-2
votes
1answer
98 views

Help me debug my 3-d collision code [closed]

I have been havaing a problem doing 3-d collision in a game i have been trying to make for several weeks now. What i am trying to do is prevent a PlayerModel object from colliding with Obstacle(cube) ...
1
vote
1answer
620 views

2D tile-based collisions: using different methods by tile?

I'm trying to write a collision handling method that handles each of the 9 potentially colliding tiles (the player's and the 8 around him) differently according to a "CollisionType" value attached to ...