Collision detection is the determination of whether or not two or more entities make contact with each other during gameplay.

learn more… | top users | synonyms (2)

1
vote
1answer
421 views

How can we match polygon data structure with a background image

I am referring to this fireball game. The ball will collide with background, which is in polygon form. I was wondering, how I can match my polygon data structure with the background image. Say, I ...
0
votes
3answers
288 views

Collision Error

I am having trouble with collision detection part of the game. I am using touch events to fire the gun as you will see in the video. Note, the android icon is a temporary graphic for the bullets ...
1
vote
3answers
529 views

How does this circle collision detection math work?

I'm going through the wildbunny blog to learn about collision detection. I'm confused about how the vectors he's talking about come into play. Here's the part that confuses me: p = ||A-B|| – ...
0
votes
2answers
562 views

Bitmap & Object Collision Help

Is it possible to detect when an object and a bitmap collide. I have an arraylist of sprites that I am shooting with an image. I tried using this method here but as soon as the bitmap appears the ...
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
3answers
771 views

Building dynamic bounding box hierachies

I've been reading about collision detection and I saw that the first part was a coarse detection which generates possible contacts using bounding box hierarchies. I understand the concept of ...
8
votes
3answers
1k views

How to find 2D grid cells swept by a moving circle?

I'm making a game based on a 2D grid, with some cells passable and some not. Dynamic objects can move continuously, independent of the grid, but need to collide with impassable cells. I wrote an ...
1
vote
1answer
446 views

Normal vector of a face loaded from an FBX model during collision?

I'm loading a simple 6 sided cube from a UV-mapped FBX model and I'm using a BoundingBox to test for collisions. Once I determine there's a collision, I want to use the normal vector of the collided ...
2
votes
3answers
1k views

Detect click on Triangle and Circle buttons

How can I detect clicks on a texture (which will be a button in my game) which has the form of a triangle or circle. I only know the rectangle solution which uses the position, width, and height; ...
8
votes
2answers
388 views

Platform jumping problems with AABB collisions

See the diagram first: When my AABB physics engine resolves an intersection, it does so by finding the axis where the penetration is smaller, then "push out" the entity on that axis. Considering ...
3
votes
2answers
2k views

3D Ball Physics Theory: collision response on ground and against walls?

I'm really struggling to get a strong grasp on how I should be handling collision response in a game engine I'm building around a 3D ball physics concept. Think Monkey Ball as an example of the type ...
8
votes
5answers
4k views

How do I detect the direction of 2D rectangular object collisions?

After this question, I need some more help. How can I find out which side of a rectangle a collision came from and react accordingly? The blue arrows are the paths that some circular objects ...
0
votes
1answer
398 views

What maths should I learn for game programming, and what aspect of programming does it relate to? [duplicate]

Possible Duplicate: What math should all game programmers know? Obviously a good knowledge of maths is essential for good programming, my maths isn’t the best ( I didn’t pay attention in ...
1
vote
2answers
7k views

Tips for writing 3D Collision detection with opengl

I would like to any tips/articles/tutorials on how to write collision detection using OpenGL and C++ in 3D mainly just simple box collisions etc but also if there are any advanced resources that would ...
1
vote
1answer
314 views

How are trajectories calculated and transmitted to other players in Multi-Player?

I play alot of COD4. And can see tracers for gunfire, missles, care packages fall from helicopters etc. There is alot of activity. I am curious to know the algorithm (at a high level) that manages ...
1
vote
1answer
578 views

XNA Automatic Collision detection from model?

This is going to be a rather vague question xD In XNA is there a way of working out if a point or rectangle is colliding with a 3D .x object? It is a big model, and would take a long time to map out ...
2
votes
2answers
191 views

Collisions between players at spawnpoints

I am working on a FPS/MMORPG and ran into a problem at spawnpoints, when I enabled collision detection between players. Neither player would be able to move if both spawned at the same time, because ...
1
vote
1answer
241 views

How can I know in which direction 2 balls will go in billiard game?

When a ball is struck, how can we know in which direction both balls will go when ball is struck? I know the angle at which the ball strikes the other ball matters, but how can we calculate that ...
0
votes
1answer
2k views

Java/Android pixel perfect hit detection

I am making a game for android which I need hit detection between two objects. The first bitmap I have is a flying superhero, and the second bitmap is anything that he collides with. The superhero ...
1
vote
2answers
667 views

Which axis-aligned line does an AABB collide with first?

I am making the collision resolution system for my 2d top-down game, and I managed to find a solution where I query which surfaces of other AABBs the current entity can collide with in the next frame. ...
3
votes
4answers
672 views

How to avoid collision detection to enter infinite loop in this case?

I am writing a collision detection system which uses the logic mentioned by Trevor here But I have anticipated a problem which I have shown as a diagram How do we handle this problem?
1
vote
1answer
1k views

XNA boundingbox 2d rectangle

I'm checking to see if the ray that I've created is intersecting with a rectangle. I'm using the boundingbox class to pass the rectangle into the intersect method in the Ray class, but unfortunately ...
1
vote
2answers
823 views

Getting 2D Platformer entity collision Response Correct (side-to-side + jumping/landing on heads)

I've been working on a 2D (tile based) 2D platformer for iOS and I've got basic entity collision detection working, but there's just something not right about it and I can't quite figure out how to ...
15
votes
2answers
1k views

Where should collision detection logic be placed?

I am developing a small 2D game engine. The characters have a paint method which currently does the following: Calculate the new position of the character as per its speed, etc. Update the collision ...
7
votes
2answers
3k views

Stuck in Wall after rectangle bounding box collision

Using XNA's built in Intersects() on two Rectangles, I can detect a collision and set my velocity to zero. However, the object is stuck there and can't get out! How can I resolve this collision ...
2
votes
1answer
967 views

How do I determine the collision normal in an axis aligned bounding box collision?

I have a 3d moving box and a stationary box. I can detect collisions ok but now I would like to slide the moving box against the stationary box as a collision response. For this I need the normal of ...
4
votes
1answer
919 views

Closest point on an ellipsoid

I need to know how to get the closest point on the surface of an ellipsoid to another point. I had an idea, but apparently i was wrong, and oversimplfying. What i did was squash the ellipsoid and ...
1
vote
1answer
3k views

Collision Detection for sidescrolling Tile based Game

I've been working on a tile based game with a 2d array as fundamental ground for my tiles. Now my next step is to have the wall tiles be impenetrable, so that the player can walk ontop of them and ...
4
votes
1answer
740 views

Ellipsoid v. Box collision detection

I'm trying to write some collision detection code. ATM i have the code properly resolving Ellipsoid v. Ellipsoid collisions, and Box v. Box collisions, but Ellipsoid v. Box collisions doesnt work. ...
2
votes
1answer
369 views

How to efficiently organise all object in a large space

I've just about started with a project I've had in mind for ages. I don't quite know how to start such big projects (bigger than Pong, anyway), so I thought I would get started by making a basic ...
6
votes
2answers
507 views

Collision Detection/Response in Vector-based levels

I have a 2D side scroller whose levels are stored as vectors (that is, a bunch of lines) which looks like this: How would I detect that I'm colliding with one of these lines, and react accordingly ...
2
votes
3answers
3k views

Unity, changing gravity game & stopping character when he hit a wall

i am currently working on a 2d puzzle game in the unity engine. One of the aspect of this game is the possibility to rotate the level of 90°. It also rotate the gravity. The main character is not ...
2
votes
2answers
288 views

Testing for 2D collision outcome

I'm currently building a small 2D game in Processing (and it has to be Processing) for a school project. The basic makeup of the game is 4 different cells (objects, all are circles): An avatar, ...
5
votes
2answers
1k views

Tile based collision detection failing when player is going too fast

I'm creating a side scroller and I'm have a problem with my collision detection. The collision detection works perfect when the player is falling at a constant speed, but when I implement more ...
5
votes
4answers
278 views

detecting the coordinates where a bullet hits a mesh

I have a lot of complex objects in a scene and I'm looking for an efficient way to find which object a fired bullet hits, and to find the hit coordinates. It would be best if there was a lightweight ...
6
votes
2answers
3k views

Tiled based map collision detection problem

I'm working on a tile-based Mario clone. I have implemented the tile based collision method from the tutorial http://www.tonypa.pri.ee/tbw/tut05.html. This works all fine when walking and falling. ...
14
votes
2answers
1k views

Best/Efficient way to implement a 3d Collision

I've already programmed a 2d based collision system for a previous game. It was my first collision system and it was ugly. I was looking for collision between objects by checking all objects with all ...
2
votes
3answers
1k views

Actionscript 3: Which side of object is hit?

I have a two objects colliding with each other. I am testing for the collision with if(ob1.hitTestObject(ob2)){//do something }. Is there a way to determine which side of the object was hit, i.e. if ...
6
votes
4answers
2k views

How do I find the intersection of two lines

I have a bounding box on my character, its position in the previous frame an the current frame. The bounding box is axis aligned. My character is running around inside a cave, I have a list of ...
3
votes
2answers
246 views

How to generate slopes that meet the plane, is using collision detection a good idea?

I have a terrain, which is defined by mesh. And there are a lot of other polygonal faces scattered throughout the terrain, they can be located above, or below or cutting through the terrain. You can ...
4
votes
1answer
3k views

Line-Rectangle Collision Detection and Response

I've looked through Google and none of the solutions seem to pinpoint my idea. Ultimately, I want to create a level editor where I can draw lines and have them exported to a file for my engine to ...
1
vote
2answers
501 views

Problems with Creating Snake's Clone on Java

I'm creating Snake's clone. My app have too classes: Snake.java and Board.java. Right now I have three problems: 1) There are two constants - BOARDS_WIDTH, BOARDS_HEIGHT. They are meant to be ...
2
votes
1answer
283 views

Different collision effects on different objects

I'm a beginner to Corona and game development. I am using a variety of objects in my game. On collision, they all perform the same function. I want them to do different things, and also want some ...
5
votes
3answers
2k views

Make my NPC “see” gameobjects around him in Unity

I have a walking NPC that will "see" the wall in front or behind him (2d gameplay) and that will react accordingly. I was thinking to attach him to an invisible collider that would react to objects ...
1
vote
2answers
617 views

Ball bouncing within polygon

I saw there are quite a number of articles and sample code regarding ball bouncing within a rectangle. Is there any articles or sample code regarding ball bouncing within a polygon? I try to look ...
2
votes
3answers
2k views

2d Collision detecton axis aligned boxes

I have recently run into some trouble with my collision detection. My game is composed of a map made out of axis aligned squares. The player has an x and y velocity, and I want to know how I can find ...
1
vote
4answers
2k views

Have a simple enemy detecting he touch a wall to make him stop/turn around

I am doing a very simple scene with a cube sliding on the "ground". Once the cube reach a wall, he is blocked. I want to detect the wall to make the cube go in the other direction. I used ...
1
vote
1answer
145 views

Degrees to Coordinates

Hey, I'm creating my second game ever, but this time - using Java. Before I used Pascal and CRT module! =D It's 2D game where you need to drag the ball with mouse from location A to location B. Right ...
-1
votes
1answer
159 views

Operations on multiple overlapping layers not working

Hi I am developing a game in android just like Farmville by Zinga. In that game we have to place elements in the diamond shaped field so the don't overlap each other. Now I did coding for placing the ...
9
votes
1answer
2k views

How to create a realistic 2D Role-Playing game collision detection?

I’ve always wanted to create an old-fashionned 2D Role-Playing Game like Star Ocean, Final Fantasy, Sword of Mana and even the “Tales of” series, and I guess a lot of people do. But before even ...