Tagged Questions
0
votes
2answers
99 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 ...
3
votes
3answers
121 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
90 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
0answers
30 views
Need help with collision with player and tiles XNA [closed]
I have a player collision with the rectangle size 16x32
and the tiles are in 16x16 sizes. I have a problem checking collision with player touching 2(or more) tiles ontop of each other.
My code works ...
0
votes
1answer
78 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 ...
-7
votes
1answer
57 views
0
votes
1answer
105 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
139 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
99 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 ...
1
vote
2answers
166 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
128 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 ...
0
votes
1answer
107 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
66 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
88 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
286 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 ...
5
votes
2answers
133 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 ...
2
votes
2answers
322 views
3D Collision Detection with XNA
So I'm trying to implement some collision detection in XNA. I'm aware of the Bounding Spheres, but I worry with the accuracy, most items in my game are cubic in nature, so it seems very square-peg in ...
4
votes
1answer
151 views
Networked Physics - Interpolation Causes Physics Engine to Explode
A major issue I am encountering right now is that my physics engine (BEPU) and my network interpolation are conflicting with each other.
The player is a physics object, and so the physics engine ...
-1
votes
2answers
132 views
Collisions and camera tilt in XNA C# 3D Game
I am working on a game programming class project and need some help. I cannot find a good tutorial on how to get these 3 frictionless spheres to collide with each-other, the surface and the walls of ...
0
votes
0answers
162 views
(XNA - Farseer) Not always colliding and moves seemingly randomly then objects freeze if they do collide
So I'm mixing XNA and Farseer, the first for graphics and the latter for collision and physics. If this is a horrible choice to start out with, tell me that as well.
In any case, I have set up a ...
1
vote
2answers
134 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 ...
-1
votes
1answer
93 views
Rectangle collision handling without sticking together [closed]
I'm trying to implement collisions between two solid objects. I want the objects to stop moving in their current direction when they hit another solid object (hitting a wall). So far, they always ...
2
votes
1answer
225 views
Collision detection with XNA and TiledLib
I recently started learning XNA and after getting annoyed with creating individuals rectangles each time I wanted to add something I went with TiledLib so I could more easily create levels using the ...
1
vote
2answers
151 views
Per color collision is really expensive - can my approach be improved?
I've been working on adding a color based collision component which takes a list of colors and checks to see if an object is colliding with any of them. However, the operation seems to be extremely ...
3
votes
2answers
328 views
XNA 4.0 / C# Collision Response
Okay, this is really starting to annoy me.
First of all, detecting collisions is nice and easy. I have a list of tiles,
and a player. The player and each tile have their own rectangles. (The tiles ...
2
votes
1answer
161 views
Min/Max of two vectors?
This seems like a simple question, but i'm having trouble searching the internet for it.
In XNA, during a collision detecting method, I would determin the minimum of some vectors.
// Get the minimum ...
4
votes
2answers
549 views
Get collision details from Rectangle.Intersects()
I have a Breakout game in which, at some point, I detect the collision between the ball and the paddle with something like this:
// Ball class
rectangle.Intersects(paddle.Rectangle);
Is there any ...
0
votes
1answer
157 views
Can't detect collision properly using Rectangle.Intersects() [closed]
I'm using a single sprite sheet image as the main texture for my breakout game. The image is this:
My code is a little confusing, since I'm creating two elements from the same Texture using a ...
1
vote
1answer
221 views
XNA Per-Polygon Collision Check
I'm working on a project in XNA for WP7 with a low-poly environment, my problem is I need to setup a working per-polygon collision check between 2 or more 3d meshes.
I've checked tons of tutorials ...
1
vote
1answer
211 views
Detecting pixels in a rotated Texture2D in XNA?
I know things similar to this have been posted, but I'm still trying to find a good solution... I'm drawing Texture2D objects on the ground in my game, and for Mouse-Over or targeting methods, I'm ...
9
votes
2answers
958 views
Faster 2D Collision detection
Recently I've been working on a fast-paced 2d shooter and I came across a mighty problem. Collision detection. Sure, it is working, but it is very slow.
My goal is: Have lots of enemies on screen and ...
-2
votes
1answer
217 views
XNA 2D vehicle wall collisions
I am attempting to implement collisions for my truck game, where the truck can drive around the world and hit walls surrounding the level and various randomly placed walls within the level. I am able ...
-2
votes
1answer
271 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 ...
0
votes
1answer
217 views
How to collide with a 45degree wall in XNA
I want to make a PAC MAN imitation game to start working on AI, and while my first version will feature rectangles with widths or heights of 1 to makes walls for collision detection, I want to ...
4
votes
2answers
550 views
XNA 2D Rotated Rectangle Collision Response
I am using Rotated Rectangles which collide using the Separating Axis Theorem and they work perfectly fine for collision detection using Intersects and Contains.
However, I am starting to use faster ...
-1
votes
3answers
819 views
XNA how to make wall collision
Hi there i have collision detection but i dont know how to stop object after collision and then move backward for example
any ideas ?
0
votes
2answers
376 views
Calculate the intersection depth between a rectangle and a right triangle
all. I'm working on a 2D platformer built in C#/XNA, and I'm having a lot of problems calculating the intersection depth between a standard rectangle (used for sprites) and a right triangle (used for ...
1
vote
1answer
196 views
How would I be able to get a game over screen using the pause function?
I am having problems with my snake game, when the snake collides with itself it draws a "game over" image in the background, but only while it's colliding with itself. I want it to behave like the ...
0
votes
2answers
362 views
My grid based collision detection is slow
Something about my implementation of a basic 2x4 grid for collision detection is slow - so slow in fact, that it's actually faster to simply check every bullet from every enemy to see if the ...
1
vote
1answer
182 views
Viewport.Unproject - Checking if a model intersects a large sprite
Let's say I have a sprite, drawn like this:
spriteBatch.Draw(levelCannons[i].texture, levelCannons[i].position, null, alpha, levelCannons[i].rotation, Vector2.Zero, scale, SpriteEffects.None, 0);
...
1
vote
1answer
193 views
Grid based collision - How many cells?
The game I'm creating is a bullet hell game, so there can be quite a few objects on the screen at any given time. It probably maxes out at about 40 enemies and 200 or so bullets. That being said, I'm ...
1
vote
2answers
401 views
XNA How to detect collision between 2d sprites and 3d primitives (not models)
My current status:
I have already read some tutorials about 3d collision
I know how ray trace works and how to convert mouse follow a vector to track the closest object that collides with out vector
...
1
vote
1answer
269 views
Ball bouncing at a certain angle and efficiency computations
I would like to make a pong game with a small twist (for now).
Every time the ball bounces off one of the paddles i want it to be under a certain angle (between a min and a max). I simply can't ...
0
votes
1answer
319 views
2D Tile Based Particle Collisions
I have a basic 2D particle system and I'm now looking to implement collisions, however I'm not sure on what the best way to do it is. My game is tile based and runs in XNA Game Studio 4.0. I've seen ...
1
vote
2answers
441 views
Checking collision in an array - is there a better way?
MSDN suggested this, but I'm worried about it slowing down the game when there are a lot of objects to check:
for (int i = 0; i < enemy.Length; i++)
{
if (enemy[i].isActive)
{
...
1
vote
2answers
215 views
Boolean checks with a single quadtree, or multiple quadtrees?
I'm currently developing a 2D sidescrolling shooter game for PC (think metroidvania but with a lot more happening at once). Using XNA.
I'm utilising quadtrees for my spatial partitioning system.
All ...
1
vote
1answer
142 views
How can I resolve collisions at different speeds, depending on the direction?
I have, for all intents and purposes, a Triangle class that objects in my scene can collide with (In actuality, the right side of a parallelogram).
My collision detection and resolution code works ...
0
votes
3answers
935 views
2D Tile Based Collision Detection
There are a lot of topics about this and it seems each one addresses a different problem, this topic does the same.
I was looking into tile collision detection and found this where David Gouveia ...
1
vote
1answer
1k views
XNA 2D Collision with specific tiles
I am new to game programming and to these sites for help. I am making a 2D game but I can't seem to get the collision between my character and certain tiles. I have a map filled with grass tiles and ...
0
votes
1answer
218 views
Using 2d collision with 3d objects
I'm planning to write a fairly basic scrolling shoot 'em up, however, I have run into a query with regards to checking for collision. I plan to have a fixed top down view, where the player and ...


