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)

2
votes
1answer
163 views

JBox2D Polygon Collisions Acting Strange

I have been playing around with JBox2D and Slick2D and made a little demo with a ground object, a box object, and two different polygons. The problem I am facing is that the collision-detection for ...
-1
votes
1answer
280 views

Detailed Modern Opengl Tutorial? [duplicate]

I am asking for a specific modern opengl tutorial. I need a tutorial that does not skip to explain any lines of code. It should also include different independent objects moving/rotating (most ...
3
votes
3answers
406 views

2D game with 3D collision?

How do they do this bounce? Looks awfully complicated in 2D.
2
votes
2answers
407 views

Would it be more efficient to handle 2D collision detection with polygons, rather than both squares/polygons?

I'm working on a 2D game engine and I'm trying to get collision detection as efficient as possible. One thing I've noted is that I have a Rectangle Collision collider, a Shape (polygon) collider and a ...
0
votes
1answer
164 views

LWJGL Java 2D collision when lagging

I'm using a tile based collision, but when the game is lagging (the lag isn't the problem) the collision fails and the player falls through tiles. This is the movement/collision detection code of my ...
1
vote
1answer
106 views

Adding Leniency to Jumping Mechanic

I have written some jumping code for my player in a platformer game. At the moment it has some basic logic which says that the player can jump if he is on the ground. The pseudocode looks something ...
4
votes
1answer
280 views

Problem with SAT collision detection overlap checking code

I'm trying to implement a script that detects whether two rotated rectangles collide for my game, using SAT (Separating Axis Theorem). I used the method explained in the following article for my ...
8
votes
3answers
720 views

Ball vs 45-degree slope collision detection

I have a simple game in which the player moves a ball around. The ball bounces off of walls. Right now I have square walls(■) implemented: I use simple bounding-box collisions to check if the player ...
0
votes
1answer
315 views

Collision detection with multiple polygons simultaneously

I've written a collision system which detects/resolves collisions between a rectangular player and a convex polygon world using the Separating Axis Theorem. This scheme works fine when the player is ...
0
votes
1answer
181 views

Collision detection without classes, in Pygame

I am writing a game in Pygame and want to get collision detection working. The aim is that when an object hits another, the target object disappears. I want to avoid having classes for now, to keep ...
2
votes
1answer
149 views

Have the character automatically slide around obstacle corners [duplicate]

Like this: The player is only holding right, however the character still moves up a bit to go around an obstacle. My current collision system has access to: The entity's previous position The ...
0
votes
1answer
242 views

Performing intersection testing in world's or object's space?

Am adding basic ray casting and collision detection for my game, also adding bounding volumes/collision mesh. Given that the ray is cast in world space and each mesh's node can track world ...
9
votes
2answers
317 views

Falling Blocks and complex shapes

I currently have a simple Tetris-like game and have come across a problem I cannot solve. Unlike Tetris where there is a single falling shape, I have multiple, potentially interlocking shapes that ...
3
votes
1answer
370 views

How do I detect a tile map collision's direction? [duplicate]

I'm implementing collision detection with the map for my platformer. I have a method that generates a polygon on every tile and checks if the player hits it -- that's all fine. The problem is that ...
0
votes
2answers
2k views

Java collision detection with rectangles

I'm trying to get the collision between two squares. I've made a Rectangle object that overlays each one and updates the position every tick. Then I made a collision method that checks whether they ...
-1
votes
1answer
400 views

Box2D Static-Dynamic body joint eliminates collisions

I have a static body A, and a dynamic body B, and a dynamic body C. A is filtered to not collide with anything, B and C collide with each other. I wish to create a joint between B and A. When I ...
1
vote
2answers
497 views

How do I implement collision detection with a sprite walking up a rocky-terrain hill?

I'm working in SDL and have bounding rectangles for collisions set up for each frame of the sprite's animation. However, I recently stumbled upon the issue of putting together collisions for ...
4
votes
2answers
427 views

Allowing a player to walk up and down slopes without resistance

I am trying to implement a platformer where both the player and the level are made up of arbitary polygons. One requirement is that the player can stand still on slopes, and walk up and down them ...
4
votes
2answers
1k views

Small, High-Speed Object Collisions: Avoiding Tunneling

EDIT/UPDATE: My biggest question right now is whether step 3's "t=..." equation is a good idea or there a better way to do it. Most other issues have been partially or fully addressed, but no ...
1
vote
1answer
469 views

How to simulate cylinder shape in collision detection?

AFAIK, many physics engines like Physx and Havok don't incorporate cylinder as basic shape because it is expensive than sphere, box and capsule. But bullet engine does incorporate cylinder as a basic ...
0
votes
0answers
67 views

Collision detection - relative distance

Assume an object move toward a polygon board in 3D field . In order to detect whether the object collide in the board , according to the lecture notes of my Computer Graphics Course lecturer - it ...
2
votes
1answer
95 views

Robust “soft” platform collision using SAT

We'll start with the questions, then a pile of background: How do you rigorously and thoroughly define "soft collision" of the Mario-esque type (if I start above, or in a jump my feet apex above a ...
0
votes
1answer
310 views

cocos2d collision detection between two ccsprites i am using boundingBox but this method is not working [closed]

I am making a cocos2d side scroller and I am currently putting collision detection in. I have an enemy that shoots at the player. I want to have the bullets disappear when they hit the player. The ...
0
votes
2answers
140 views

Help choosing a collision prediction method?

This takes a little backstory, bear with me. This is also a very general question, and I'm aware that without greater specifics the best answer might be "it depends." So the context is that we're ...
0
votes
0answers
241 views

Finding a normal vector

I'm trying to replace my old integer based movement and collision system with a vector system, because its more precise and more flexible. I want to implement wall sliding, such that if a player hits ...
0
votes
1answer
310 views

Having to check collisions twice per game tic

I have vertically moving elevators (3 solid tiles wide) and static solid tiles. Each are separate entities and therefore have their own respective collision routines (to check for, and resolve, ...
0
votes
2answers
426 views

Pygame - CollideRect - But How Do They Collide?

I'm having some trouble figuring out how I can handle collisions that are specifically colliding on the top or bottom a rect. How can specify those collisions? Here's a little code snippet to give ...
1
vote
1answer
890 views

Moving bounding box in 3D using Libgdx

How do i go about moving a bounding box in libgdx? I want to make the bounding box capture my character and move with him. So ideally i want to be able to copy my vector 3 from my model instance and ...
0
votes
2answers
102 views

How to cancel out simultaneous collisions in libGosu?

I am working on an Asteroids remake. When the player's bullets hit a large meteor, it should break apart into 2 smaller meteors. This works when the player is only firing one bullet, but when the ...
1
vote
0answers
241 views

How to identify whether the boundingvolume intersects with walls or floor when it doesnt return normals?

My game in jMonkey is the kind that use will have to place objects in a scene (which consist of walls and slabs and floor). All my models are centered at origin. When the user click a point I use ray ...
7
votes
3answers
679 views

Reusable top-down collision class

I've recently picked up monogame and am working on a simple top down game to get me started and learn the basics. I've got the movement and the rotation to follow the mouse sorted out but I'm stuck ...
3
votes
1answer
1k views

Pixel Perfect Collision Detection in Cocos2dx

I am trying to port the pixel perfect collision detection in Cocos2d-x the original version was made for Cocos2D and can be found here: ...
0
votes
1answer
138 views

How to place an object so that it does not overlap the objects in my scene?

In my game, the user has to click at a point to place an object (mesh). I can cast a ray and find the horizontal point where the object can be translated and then attached to rootNode to display it. ...
6
votes
1answer
279 views

Collision Detection problems for vertically moving platforms

Background My game is a static screen (ie, no scrolling) 2d platformer and my CD routine is split into 2 - after vertical movements, (ie, gravity etc) I check for collisions, and if they are ...
0
votes
1answer
107 views

Rectangle collision doesn't work on WP 8

Collision detection is not working correctly when my 64x64 pixel block touches a bigger block. The big(rect2big) block measures 128x128 pixel. The falling block should change it's color to black when ...
2
votes
0answers
180 views

Collision detection with an irregular curve

I'm building a custom physics engine to accompany a level-editor. This image shows how the level-editor outputs levels: Now, some explanation is in order. The curve is defined by the red points. ...
3
votes
1answer
305 views

Simple 3D collision detection for general polyhedra

I have correctly set up a SAT system. I now need to determine a simple, fast, and general purpose collision detection mechanism to identify the collision points. These points will then be used to ...
0
votes
1answer
196 views

Collision Issues

When I run the collision code, there are no errors, but when I shoot the enemy nothing happens..... Any problems that are blindingly obvious? Class Level Variables public Model model { get; ...
-1
votes
1answer
813 views

Xna tile map collision

I finally found a tutorial on tile maps and loading them in from a file that I understand (http://circlessuck.blogspot.co.uk/2012/09/xna-tutorial-basic-tile-engine-part-2.html), however the tutorial ...
0
votes
1answer
293 views

Collision Detection: Simulation Inexplicably Slowing Down/How To Efficiently Calculate Extremes In Each Dimension

BACKGROUND: As discussed here: Fast 2D collision detection in an unbounded space I am working on a collision detection algorithm for a simulation. The catch that makes this case unique is that the ...
1
vote
1answer
490 views

Box2D: Efficient method to create b2Chainshapes for a tile-based map?

I'm working on a platforming game with tile based levels. I store the collision model for my tileset in an array. This is how the collision model for a 4x4 tilesheet would look like (I can't post ...
-1
votes
1answer
259 views

3d Wall sliding collision

I'm working on collision for walls in my game and the way I currently have it I get stuck walking into a wall. I'm trying to make my character slide on the walls but still collide. My character moves ...
2
votes
1answer
139 views

SAT test for Triangle - convex hull

I'm having real trouble resolving this issue with triangle-convex hull SAT test intersection. The problem is as follows: Misses are detected accurately enough: Clear miss I have not found a ...
1
vote
2answers
822 views

How to check for cube collisions?

I want a method, which takes two "ObjectBox" objects (A "ObjectBox" has .getX() .getY() .getZ() .getSizeX() .getSizeY() .getSizeZ() methods) as a parameter and return true if the two Boxes are ...
3
votes
1answer
232 views

Collision detection in games in 3D - edge to edge cross product

I am having trouble understanding why, in a game collision detection, separating axis determination requires checking for the cross product of edges of the two polytopes as additional potential ...
0
votes
1answer
322 views

C# XNA4 2D Collision Detection

I am working on a 2D engine in Xna and am running in a bit of trouble with Collision implementation. What I want to do is have an interface ICollidable that I can add to GameObjects that are ...
5
votes
2answers
716 views

How do collision meshes work in games like Zelda on the N64?

I was recently reading about the technology of Ocarina of Time/Majoras Mask and discovered that world collision is done using a single triangle mesh (vertices, normals, etc) for an entire area. There ...
0
votes
1answer
1k views

Separate axis theorem applied to AABB misunderstood

I'm trying to implement a collision system for a 2D platformer using the SAT algorithm. For what i need, my implementation only handles AABB's, i followed the instructions given here. It works, there ...
2
votes
2answers
169 views

How collisions should be handled in terms of design

I'm not sure how should I design the collision part in order to respond the all the game requests. First that comes in mind is 1. Update the game objects positions 2. Check the collision 3. Update ...
0
votes
1answer
2k views

Android Bitmap: Collision Detecting

I am writing an Android game right now and I would need some help in the collision of the Pawns on screen. I figured I could run a for loop on the Player class with all Pawn objects on the screen ...