Tagged Questions
2
votes
1answer
46 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 ...
0
votes
0answers
24 views
Error in Pixel-Pixel-Collision [closed]
I have got this pixel-pixel-collision code, but unfortunately, it gives me an error: Index outside range of the array on if (((t1[i] & 0xff000000) > 0) && (t2[i] == 0xffC3C3C3)) inside ...
3
votes
1answer
74 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 ...
0
votes
2answers
125 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
142 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
100 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
81 views
Irrlicht collision with a invisible mesh [closed]
I'm writing a Final Fantasy-like game engine, with 2D backgrounds and 3D models with Irrlicht.
To calculate collisions with the objects in the background I use a invisible mesh like this:
I have ...
0
votes
1answer
110 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
votes
2answers
104 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
175 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
3answers
225 views
How should I calculate the new angle/direction of my ball hitting a wall? [duplicate]
I'm building a Pong game and I am stuck at how the ball should bounce when hitting a horizontal wall.
I tried a few methods but none seems to work.
So far I have an update method, which is called ...
0
votes
1answer
114 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 ...
-2
votes
1answer
90 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) ...
0
votes
1answer
195 views
Creating A Bounding Box around each item in a list XNA 4.0
I have asked a similar question before except i am more experienced and have more understanding of XNA. I have bullets that shoot whenever you press RightTrigger. I am having trouble though creating ...
5
votes
2answers
139 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
343 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 ...
0
votes
1answer
159 views
How to make AABB collisions work? [closed]
I am unable to make efficient AABB collision in XNA 4. I am making a platformer, with tile based map.
Here is what I do in my tile class :
public virtual void Update(GameTime gameTime, ...
-1
votes
2answers
135 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
2answers
160 views
3d to 2d Collision
I have a 3d model which rotates around my screen, it's always on the Z axis = 0 where everything of my 2d images are. My 2d images fly out of the center and get bigger to give the view as getting ...
2
votes
1answer
236 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 ...
3
votes
2answers
369 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 ...
0
votes
2answers
140 views
Why does this collision detection & resolution code only work for one side?
I am having a bit of trouble with my collision detection. It only works correctly for the right side, meaning, if I enter the tile from any other side, it brings me to the right side.
Here is my ...
5
votes
2answers
696 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
167 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 ...
0
votes
2answers
280 views
map data structure in pacman
i am trying to make a pacman game in c# using GDI+, i have done some basic work and i have previously replicated games like copter-it and minesweeper. but i am confused about how do i implement the ...
1
vote
1answer
121 views
this.BoundingBox.Intersects(Wall[0].BoundingBox) not working properly
I seem to be having this problem a lot, I'm still learning XNA / C# and well, trying to make a classic paddle and ball game. The problem I run into (and after debugging have no answer) is that ...
-2
votes
1answer
273 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
220 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 ...
3
votes
3answers
346 views
How to design 2D collision callback methods?
In a 2D game where you have a lot of possible combination of collision between objects, such as:
object A vs object B => object B vs A;
object A vs object C => object C vs A;
object A vs object D ...
1
vote
1answer
201 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 ...
1
vote
2answers
420 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
145 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 ...
1
vote
1answer
199 views
JigLibX collision detection only once
I try to implement collision detection in latest JiglibX using this example http://jiglibx.wikidot.com/catch-collisionevents . I choose creating callback. I try to detect collision only once. When ...
5
votes
2answers
2k views
How to determine collision direction between two rectangles?
I am trying to figure out how to determine the direction a collision occurs between two rectangles.
One rectangle does not move. The other rectangle has a velocity in any direction. When a collision ...
2
votes
1answer
660 views
Platformer Starter Kit - Collision Issues
I'm having trouble with my game that is based off the XNA Platformer starter kit.
My game uses smaller tiles (16x16) then the original (32x40) which I'm thinking may be having an effect on collision ...
1
vote
3answers
527 views
Collision Detection Problems
So I'm making a 2D tile based game but I can't quite get the collisions working properly. I've taken the code from the Platformer Sample and implemented it into my game as seen below.
One problem I'm ...
2
votes
2answers
332 views
Tile map collision is not working properly
I am having problems setting collision between my sprite and the tiles.
I have only done the code for colision for moving upwards but some places on the map it moves up and some places it doesn't.
...
1
vote
1answer
445 views
3D Collision help
I'm having difficulties with my project. I'm quite new in XNA. Anyway, I'm trying to make 3D game and I'm already stuck on one basic thing. I have terrain made from a heightmap, and an avatar model. I ...
-1
votes
2answers
558 views
How to calculate the direction a ball must bounce
I have a tile engine I have made. I can detect collision between the ball(the player) and the tiles. When a collision is detected all the colliding tiles are stored inside a list. My question now is, ...
1
vote
1answer
431 views
C# OpenTK - Getting world coordinates of points that are altered by matrices
I have written a skeletal animation system for a game i am working on. To draw lines that represent a skeleton, i use the GL matrix, and multiply it by each bone a long the body. For example before ...
6
votes
2answers
1k views
Isometric Collision Detection
I am having some issues with trying to detect collision of two isometric tile.
I have tried plotting the lines between each point on the tile and then checking for line intercepts however that didn't ...
1
vote
1answer
300 views
How to handle circle penetration
I've been working on cirlce to circle collision and have gotten the intersection method working correctly, but I'm having problems using the returned values to actually seperate the circles from one ...
3
votes
2answers
620 views
AABB > AABB collision response?
I'm really confused about how to fix this in 3d? I want it so that I can slide along cubes but without getting caught if there's 2 adjacent cubes. I've gotten it so that I can do x collision, with ...
1
vote
1answer
777 views
Circle to Circle collision, checking each circle against all others
I'm currently coding a little circle to circle collision demo but I've got a little stuck. I think I currently have the code to detect collision but I'm not sure how to loop through my list of circles ...
0
votes
2answers
2k views
Breakout collision using 2D Rectangles?
Here is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
namespace BreakOut
{
class Field
{
public static ...
6
votes
5answers
671 views
Need some advice regarding collision detection with the sprite changing its width and height
So I'm messing around with collision detection in my tile-based game and everything works fine and dandy using this method. However, now I am trying to implement sprite sheets so my character can have ...
3
votes
1answer
561 views
Character jittering with this tile based collision code
I have been trying to get my collision code working for hours now but with every resource I have tried my character still jitters. First I tried using the platformer sample but my character still ...
5
votes
2answers
1k views
Collision Detection, player correction
I am having some problems with collision detection, I have 2 types of objects excluding the player. Tiles and what I call MapObjects. The tiles are all 16x16, where the MapObjects can be any size, but ...
1
vote
1answer
381 views
Collision detection not working
I realized I put this in the wrong forum, so here it is:
I made a collision detection in the Update() section, and this is the code:
if (player.playerRect.Intersects(turtleRect))
{
...
7
votes
1answer
3k views
Microsoft XNA Platformer Example, is the Collsion Detection implemented accurately?
The example provided by Microsoft seems as if the collision detection (from what I can see) will have a small error. When the user collides with an Unpassable tile, the depth of the intersection is ...


