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)

3
votes
1answer
262 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
144 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
121 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
1k 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
162 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
133 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
4k 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
2answers
216 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
406 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
154 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
173 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
153 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
134 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
461 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
250 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
581 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
201 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
220 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
283 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
632 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
915 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
633 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
190 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
443 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
246 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
382 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
140 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 ...
1
vote
1answer
79 views

how to detect when a character is walking on an item in java

I just want to know if there is a way in java to detect when the character is on an item on the floor without without verifying if every items on the map contains the character or vice versa in every ...
0
votes
1answer
342 views

Differences between Overlap and Intersection testing?

I have heard of techniques such as overlap testing and intersection testing for collision detection and collision resolution. I looked up on the two techniques, but I don't see what differences they ...
-1
votes
1answer
150 views

Breakout style ball-paddle bounce, error at corner

I am trying to make a breakout game where you have a paddle and a ball bounces around breaking bricks. The problem is that if the ball touches the corner of player it goes inside of player. I change ...
1
vote
2answers
85 views

Mapping of positions on images in different frames

I am looking for a possibility to map different positions on a 2D Image which has different frames. Let's say I have an image, consisting of three frames, which shows a spaceship. The first frame ...
0
votes
1answer
229 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 ...
0
votes
5answers
1k views

Collision detection logic

Edit 2 In the following picture sprite1 (the red square) is hitting the platform from the left, so: sprite1_rightEdge>platformSprite leftEdge would be true, so I can simply reposition ...
1
vote
0answers
215 views

How can I implement collision for a “pseudo-3D” game?

I'm looking for high level implementation details, not specifics. I've worked with bounding boxes before in some 2D games, but I'm currently tackling a "2D + depth" (2.5D?) style game along the lines ...
0
votes
1answer
72 views

Implementing Frame of reference for physics calculations

How would I alter physical calculations to account for frame of reference of a physical body? Currently I have a world that is a collection of rigid body objects that act on each other. There is no ...
1
vote
1answer
478 views

relationship between eye height and collision body in UDK

We are using the UDK in a research lab setting so we must understand exactly how tall users feel in the virtual world (camera position). By Googling and digging through code, we have discovered the ...
2
votes
1answer
229 views

How to predict future location of a Car in a Navigation Mesh based pathfinding system?

I am developing a car based shooting game in which the Cars have to shoot each other 3/4 times and eliminate it from the game. I am trying to develop the AI for my cars now. The problem is how can I ...
0
votes
1answer
462 views

Is there a “box2d without physics” lib (only for collision detection)?

Box2d Collision detection algorithms are probably the best ones out there. Unfortunately, they are bundled together with a realistic physics engine that I don't need. Is there an open source project ...
5
votes
1answer
287 views

Automatically generate low detail collision meshes

I lately integrated Bullet Physics into my little game engine, but for now I only use basic shapes as spheres or boxes for collision checks. For more realistic physics I need collision meshes for all ...
1
vote
1answer
175 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, ...
4
votes
3answers
637 views

Fast method of detecting whether point is inside mesh

I'm trying to construct a 3d object from a large number of particles. I think this is called BVH (Bounding volume hierarchy). I figured the best way is to draw the particles inside the mesh, then let ...
1
vote
1answer
150 views

Object Detection

I'm building a collision system for my 2D game, broadphasing (sweep and prone + pair detection) works. But I don't know how to separate pickup objects, tiles and the player from each other. My ...
2
votes
1answer
352 views

How to do 2D Raycasting on a slope

I have a 2d platformer game where my slope can be set at any angle, so I've setup a middle raycast that points to the ground onto the player to handle the collision. This works perfectly fine on a ...
3
votes
2answers
83 views

Sperating axis test glitch help

I'm working on a pretty basic 2d platformer and I'm wondering if I could get advice on an issue I've run into. To keep collision detection simple I'm using AABBs and separating axis tests for ...
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
vote
3answers
490 views

Whats an elegant implementation for 2D collision detection in a block based game?

to make things clear, i do not want to know HOW to implement collision detection mathematically. What i am looking for is an elegant way to check for collisions without having to manage seperate lists ...
3
votes
2answers
327 views

How Does Ultima 7 manage different floors in 2d

In U7, you can move among floors without the function "tranport" the player to another place, as for example the first ff ones. How can it tell whenever the character is moving from floor z to ...
0
votes
0answers
147 views

How to manage multiple objects for a tile based game for collision?

So I'm making the tile-based 2D sandbox platformer...thing to get an idea of how to manage different elements of coding games. Currently I'm at the point where my collision system works fine for a ...