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)

4
votes
4answers
379 views

Wall penetration

I have a terrain with geometry that is fairly ridged. I needed to make sure the player didn't enter the world geometry, so I used sphere-triangle intersections (after narrow down of which tris to ...
2
votes
1answer
222 views

3D movement on an authoritiative server?

I'm developing an MMORPG, using Unity for the client and "standard" C# 4.0 for the authoritative server. The server should check each player's movement and ensure that it does not collide with props ...
0
votes
1answer
122 views

simple collision detection 2d match 3 gem over gem

im building simple match 3 game . now i have the parts where i move the gems with the mouse only in the straight X or straight Y up and down and both sides , no 45 degrees movements on grid . now im ...
1
vote
2answers
531 views

How would I detect if two 2D arrays of any shape collided?

Say there's two or more moveable objects of any shape in 2D plane, each object has its own 2D boolean array to act as a bounds box which can range from 10 to 100 pixels, the program then reads each ...
1
vote
1answer
2k views

How do I detect and handle collisions using a tile property with Slick2D?

I am trying to set up collision detection in Slick2D based on a tilemap. I currently have two layers on the maps I'm using, a background layer, and a collision layer. The collision layer has a tile ...
0
votes
2answers
182 views

Gravity and collision detection interfering with player movement

I am attempting to implement collision detection for a 2d sidescroller game and I'm having trouble keeping gravity from interfering with player movement. Every frame I get and handle input, creating ...
1
vote
0answers
329 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
213 views

Minimizing amount of comparisons for collisions?

In my 'Terraria' based game I am having lag issues. The cause of the lag is as follows: Every update loop through all the tiles in the world: If the rectangle that was passed as an arg intersects ...
1
vote
3answers
378 views

Preventing tunneling of small, fast objects

I'm making a basic shooter game with my friend and i have encountered a problem. I kind of know solution this but i just cant implement it. This is my first game made with XNA/MonoGame and i'm not too ...
2
votes
3answers
467 views

Lightweight Simple Fast-Object Collision Detection Algorithm/Logic

I'm making a game where i need to give my objects collision, but i have many fast small objects and normal collision algorithms (Intersection of shapes and such) do not work, because the ...
1
vote
0answers
205 views

beginContact triggered more than once on some objects

Short version: It looks like beginContact is detecting continuous collisions. I'd like to avoid that. Long version : I use Box2Dweb to write a 2D platformer. It's my first game using this lib, and, ...
3
votes
1answer
1k views

Create bullet physics rigid body along the vertices of a blender model

I am working on my first 3D game, for iphone, and I am using Blender to create models, Cocos3D game engine and Bullet for physics simulation. I am trying to learn the use of physics engine. What I ...
2
votes
3answers
468 views

How can I perform 2D side-scroller collision checks in a tile-based map?

I am trying to create a game where you have a player that can move horizontally and jump. It's kind of like Mario but it isn't a side scroller. I'm using a 2D array to implement a tile map. My ...
1
vote
1answer
256 views

Collision detection with entities/AI

I'm making my first game in Java, a top down 2D RPG. I've handled basic collision detection, rendering and have added an NPC, but I'm stuck on how to handle interaction between the player and the NPC. ...
0
votes
1answer
178 views

Why is my collision detection not accurate?

After trying and trying, I still cannot understand why the leg of character exceeds the wall but no clipping issue when I hit the wall from below. How should I fix it to make him stand still on the ...
0
votes
1answer
298 views

Collision for mobile game

I'm writing a little game in as3 using Starling, and I need to check collision between 2 boats that can rotate. I don't need the pixel perfect collision, but bounds collision is not enough too. The ...
3
votes
1answer
382 views

Sensor based vs. AABB based collision

I'm trying to write a simple collision system, which will probably be primarily used for 2D platformers, and I've been planning out an AABB system for a few weeks now, which will work seamlessly with ...
14
votes
5answers
1k views

Optimizing collision engine bottleneck

If this is your first time on this question, I suggest reading the pre-update part below first, then this part. Here's a synthesis of the problem, though: Basically, I have a collision detection ...
10
votes
2answers
532 views

How do I make good guy attacks only hit bad guys and vice versa?

My game has many different type of good guys and many different type of bad guys. They will all be firing projectiles at each other but I don't want any accidental collateral damage to occur for ...
1
vote
1answer
192 views

Python + Pygame - Collision problems

I'm currently developing a game in Python + Pygame and i came up with a problem with the player and the platforms. The game is a 'runner' where the player it's fixed (The 'x' position isn't variable, ...
3
votes
1answer
180 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
260 views

2D collision resolution: works on each axis individually, but not with both combined

My collision detection method is solid and detects box to box collision every time. Then comes the resolve part which I'm struggling with quite a bit. It works perfectly when I'm manipulating the ...
1
vote
0answers
139 views

Aiming with a crosshair with a lot of polygons/triangles

I'm working on a 3d kindof game where I'll eventually be able to modify the shapes present in the environment by pulling their faces with a crosshair. The thing is that I don't know how to achieve ...
3
votes
1answer
120 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 ...
8
votes
3answers
980 views

Are collision detection always O(n^2)?

Are physics engine able to decrease that complexity, for example by grouping objects who are near each other and check for collisions inside this group instead of against all objects ? (for example, ...
-3
votes
1answer
158 views

Collision detection-too fast [closed]

I've looked through a few other answers and it seems like I'm doing a dynamic timestep update and I'm checking about 10 pixels before the rectangle to see if it would intersect. However, the updating ...
0
votes
1answer
130 views

How to handle zooming? (Collision detection and speed are off)

I'm working on a bird's eye view 2D game. I want to zoom in/out based on the entity's speed (similar to GTA 1/2), but I'm struggling with the zooming. To zoom, I simply scale all the entities by the ...
0
votes
1answer
3k views

How do I make a game tick method?

I've seen in some other simple 2D games that a "tick" method is used to sync game logic and graphics rendering. My main reason for using this is due to my collision detection malfunctioning, since ...
2
votes
1answer
166 views

Tools to generate convex collision geometry

Does anyone know tools to generate convex collision geometry from given 3D model? For example, UDK's Static Mesh Editor can do this; Valve instead recommends to use smoothing in 3D editor. Desired ...
2
votes
3answers
380 views

Efficient Collision Detection With Numerous Objects at Once [duplicate]

I am developing a 2D game with very large levels in which two teams(around 200 objects per team) fight against each other in planes, tanks, turrets,...etc. With every entity shooting bullets at their ...
3
votes
1answer
151 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
1answer
171 views

Simple Bounding Box Multiple Collision problem

I'm making my first game, and in it I use a moving ball to hit static blocks (kinda like breakout). Basically, I loop through all of the static blocks on the screen each frame, update the position ...
1
vote
0answers
149 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
125 views

Realistic 3D Collision Detection Implementation [closed]

I understand how box collision, sphere collision, and other such collisions work. However, how would one implement realistic 3D collisions? That is, objects would interact with one another as they ...
0
votes
1answer
441 views

Detecting if “Wall” To The Left or Right Of Player Unity3D

I am working on a 3D Platformer in Unity3D and I need to prevent the player from going through walls. The movement for my player works like this: (A bird-eye-view representation)The areas the ...
3
votes
1answer
106 views

Player getting caught on floor

My player is getting caught on something on the floor. My whole environment is just blocks. I have looked through (and tried to change) just about everything I can think of in my player update method. ...
0
votes
1answer
244 views

Panda3d handling collisions on walls created in blender

Edit 2 : Updated code, so runnable zip isn't the same as the copied section bellow (though all that has changed is that part in run_me.py) Edit: Runnable zip with source files, sorry: ...
0
votes
1answer
563 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 ...
2
votes
3answers
199 views

Determining which edge a collision occurred on in a platformer

First of all, this will be Open Source, and you will be mentioned for the help. We've been programming a Super Mario Remake for the iPhone with Cocos2d for school. It looks pretty great, and we ...
28
votes
6answers
2k views

Hexagon collision detection for fast moving objects?

A object has a position and a speed vector. Usually only the position is used to check if two objects collide, this is problematic for very fast moving objects as it can happen that the object moves ...
3
votes
1answer
214 views

Is it possible to get the colliding sides using the separating axis theorem?

The title says it all, is it even possible to get the colliding sides? I'm checking for collisions between two OABBs, which works fine using SAT. Now I want to set the moving object's velocity to the ...
3
votes
2answers
278 views

When to detect and respond to collisions?

I've usually implemented collision detection like this in the past: Move entity Check if it collides with anything Resolve the collision by moving it back That's also the approach employed by most ...
8
votes
3answers
610 views

Collision detection problems using AABB's

I implemented a simple collision detection routine using AABB's between my main game sprite and various platforms (Please see code below). It works great, but I'm now introducing gravity to make my ...
2
votes
1answer
826 views

Detect collision in Blender

I am trying to write a Python function for Blender(2.66) game engine, that permits me to detect collision between two objects. I tried to read the documentation, but it's very confusing, and I don't ...
0
votes
2answers
578 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 ...
0
votes
1answer
175 views

My logic in collision detection in diagonal code correct? [closed]

I made this code to detect collision from the diagonal(top left). I'm trying to find the problem on what I'm doing wrong. Is it necessary to have a diagonal collision for the wall? Player class: ...
-1
votes
1answer
429 views

How was traditional 2D collision detection/resolution being done? [closed]

Just out of pure curiosity, I'm wondering how classic 2D games of the 80s/90s (The Legend of Zelda, Super Mario, Warcraft, ...) approached collision detection/resolution. For some reason I can't ...
4
votes
3answers
236 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
357 views

Detecting collision with a 3D array of boxes

I am at the stage of my development process where I want to implement collision. Now I can think of a simple way of doing it, if the camera's x, y or z are inside the position of a certain cube then ...
1
vote
1answer
139 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 ...