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
0answers
25 views

Manual response when 2 shapes made of rectangular volumes collide

I have 2 compound objects made of rectangular blocks. One of them (the one that is moving) has a script that listens to OnTrigger callbacks. What I need is to position the moving compound object on ...
0
votes
0answers
22 views

Box2d for large game? [on hold]

I am considering developing a terraria clone for testing purposes and also as a challenge. The physics engine has always been tough for me to smooth out so I am considering using Box2d. My concern is ...
1
vote
1answer
47 views

Triangular Mesh Collision/ Resolution

I've been trying some different approaches for collision detection and now I want to try to implement simple Mesh-Mesh collision detection for triangular meshes. I'm wondering if I'm on the right ...
0
votes
1answer
50 views

How to implement 2d collision detection that is immune to low framerate and fast movement? [duplicate]

I am trying to implement my own collision detection for a 2.5d voxel style platformer using Three.js. I have a problem with my implementation - if the framerate is too low or the character is moving ...
0
votes
0answers
12 views

iOS Sprite Kit - Distort Body Upon Collision

I am trying to create a surface that will distort upon collision of another object. Imagine a rubber partition that bends outward when shot with a projectile, and then retracts back to it's original ...
-1
votes
0answers
19 views

How do I add collisions to my 3D game made in LWJGL / OpenGL [Java]? [closed]

I spent 4 hours trying to figure out how I can add collisions to my game and simply could not find ANYTHING. I have absolutely no clue what to start with. What is the simplest way of adding super ...
-1
votes
0answers
15 views

Xna collision Prob [closed]

i have problem with doing game 2D now till now i did: create Player + map + Keyboard+ mouse now i am doing the collision with the Player and the map and i try that if the Player though One or more ...
3
votes
1answer
137 views

Jelly ground collision

For fun I am trying to replicate the mechanics from The Floor is Jelly. So far I have successfully created "jelly islands/blocks" which are represented by an array of points and then drawn by using ...
0
votes
0answers
38 views

C# BreakOut Game [closed]

Hi this is my first year of Uni doing a programming degree, I am beginner to the whole concept. Firstly I need help with getting the ball (which is drawn in a pictureBox) to collide with the bat ...
1
vote
1answer
66 views

Multiple collision detection with images

Lately, I have been researching different Collision methods, how to deal with multiple collisions and different types of bounding shapes, circles, rectangles, polygons and ellipsoids. Some common ...
0
votes
1answer
62 views

Sweep and prune vs quad tree when all objects are dynamic (moving)

As I understand it there are 3 popular strategies for spatial partitioning: sweep and prune, quad/oct tree and uniform grid. Uniform grid is problematic for me because I have not set an upper limit on ...
0
votes
0answers
41 views

Dynamically destroy objects when player enters a boxcollider2D

What would be the best approach for destroying dynamically objects when player enters a boxcollider2D? Currently using parent objects with boxcollider2d to activate OnTriggerEnter2D, boxcollider2d is ...
1
vote
0answers
64 views

Should I use Box2D for collision-detection only (not simulating physics)? [on hold]

I'm using Box2D only to check collisions and for no physical simulation. I create bodies (and shapes for them) and use my own code to move them, by setting their velocities and positions every frame. ...
0
votes
0answers
22 views

Bullet Physics for Collision Detection and Smooth Response

I'm creating a game using LibGDX, and to prevent the need to spend lots of time writing collision detection code I've decided to make use of Bullet Physics, simply for collision detection and not for ...
0
votes
0answers
49 views

How do I implement one-way platforms in AndEngine and Box2D? [closed]

I'm trying to figure out one-way platforms for my doodle jump clone on AndEngine. This post helped me a lot. I've implemented similar code on my own. Platforms should be solid only when my player's ...
0
votes
1answer
27 views

LibGDX Bounding Rectangles

I'm creating some rectangles surrounding my sprites for my player and bullet class to detect collisions with the overlaps method in Intersector class of LibGDX. I have a question: When I instantiate ...
0
votes
0answers
47 views

2D Distance Field as collision handler method

Pixeljunk Shooter has really cool fluid simulation. I found the dev's video explaining what they did. Here I understand that it is particle based simulation Smoothed Particle Hydrodynamic I can ...
0
votes
0answers
50 views

Load character instead of load level

I have some trouble finding out how I can load my character at the start of the level, instead of resetting the whole thing. The game mechanics are quite straight forward; don't touch the walls. If ...
0
votes
0answers
33 views

How do I apply Farseer Physics Engine Collision on my image? I tried it on my codes and it is not working

How do I apply Farseer Physics Engine Collision on my image? I tried it on my codes and it is not working. PoolGameSingle poolgame = new PoolGameSingle(); var cue = poolgame.CueStick; ...
0
votes
0answers
56 views

Separating Axis Theorem contactNormal

I implemented the separating axes theorem as described in "Real time collision detection" by Ericson for my OBB vs OBB collision. Got that working. To continue with my collision response I need more ...
0
votes
1answer
46 views

Set a component on root gameobject for working all the children

I have a enemy which has ragdoll. So it has a few child object and each child has own collider. I dont want to add script for every child for just OnCollisionEnter function. All of them will work ...
0
votes
1answer
77 views

How do I make a sprite collide with walls in pygame?

I've been trying to create a collision detection between the player (Blue), and the walls (Green), but the player can just move through the walls. I made it so that every collision is printed in the ...
0
votes
0answers
60 views

Collision detection in 3d

what is the simplest algorithm for collision detection that respects the following requirements: The collision is only between cubes that are always aligned with the axis of the world (not rotated). ...
1
vote
0answers
25 views

Drag and drop in Flare3d

Now iam working on drag and drop prototype in flare3d.I have a f3d object and have different boxes to place the parts of the f3d objects . when i drag the parts of f3d object towards the boxes,if ...
0
votes
4answers
117 views

When would a mesh collider be better than primitive colliders

I have been reading through the Unity Manual and have come across some interesting information about mesh colliders and primitive colliders. It got me wondering if using many primitive colliders would ...
0
votes
0answers
35 views

LibGDX - Tiled Map Layer Collision [duplicate]

I'm currently using LibGDX for a Atari 2600 style dungeon exploring game. I use the Tiled map editor as my editor of choice. Plus it's the best in my opinion for mac. I'm using LibGDX because of it's ...
0
votes
2answers
50 views

Issue implementing proper collision in XNA Game Studio 4.0

I am building a game in XNA 4.0, where a player moves about a 2 dimensional (vertical perspective) map consisting of blocks. My issue is creating proper collision between the payer and the blocks ...
-1
votes
1answer
69 views

Why Is My AABB Collision Detection Not Working

I am going to be making a 3D game and I need to be able to test for accurate collision. I was able to get bounding sphere collision working (too inaccurate to be used for the whole game), but AABB ...
0
votes
1answer
124 views

How to determine the distance between a point and a rotated rectangle

This question is very similar to How do I calculate distance from a point to a rectangle?. But that question assumes that the rectangle is axis-alligned, or not rotated. So just like in that ...
2
votes
0answers
79 views

Why is OnCollisionEnter2D called when it's layer's collisions are being ignored?

I'm sure this is down to my lack of understanding of the unity physics system. I'm trying to implement a simple one-way platform for a 2d game and have got stuck on creating a reliable way to let the ...
3
votes
2answers
143 views

Find a position within one radius, but outside other radii

I have an Object A which will attempt to stay within a certain distance of another Object B. I would like Object A to also try to stay outside a certain distance of one or more other Objects R. The ...
1
vote
0answers
130 views

How do I detect collisions between a particle-based net and a ball?

I've implemented a net using Verlet integration and many points connected with constrains; like this demo, but in 3D. I want to implement collision detection between this net and a ball (like in a ...
2
votes
1answer
173 views

Collision detection between 2 irregular shapes

I need to implement a collision system for a vertical-shotter and the bullets can have any type of shape; i've implemented the shape class with an array of choords and an array of lines which have the ...
0
votes
1answer
62 views

How do I raycast to detect which hexagonal tile was clicked?

I want to detect the hexagonal tile a unit is on upon clicking on the unit. I was thinking of using a ray cast I can't get it to work. I'm trying to get the raycast to shoot from the bottom of the ...
1
vote
0answers
90 views

How do I implement melee hit boxes for a top-down game?

For a 3D top-down game, how should I handle collision in melee combat? My game has no targeting system, so I can't use a simple distance check between attacker and target. What I am thinking is have ...
0
votes
0answers
34 views

How can I have an RPG character redirect / glance off stationary objects and keep going? [duplicate]

I am attempting to create an effect in a game that is identical to the effect I've shown in the attached gifs. Essentially, the character, when they are running or walking and hit an object that is ...
2
votes
2answers
88 views

How to preserve topology for penetration correction?

I have a sorted list of blocks - some may overlap some may not. Each block has an ideal starting position and may be constrained to one axis. There are no velocity or acceleration or other forces ...
2
votes
1answer
120 views

Minkowski Portal Refinement collision detection algorithm

Preface: While I was learning the basics of collision detection, I read in various places that the SAT and GJK algorithms don't natively return contact points. So I decided to research the MPR ...
0
votes
1answer
93 views

2D physics collision/gravity problem?

I'm using Love2D and my own physics engine to create a 2D platformer. Y collision works fine, but X collision... well, it's a bit buggy. When I move off of a small platform I've created, I fall but it ...
1
vote
0answers
56 views

A problem with collision when a sprite changes size (Phaser framework)

I have a sprite in my game that changes size at certain points in the game. It changes size via the sprite.body.setSize method. Unfortunately, it seems that the sprite is unaffected by objects that it ...
2
votes
2answers
255 views

Detecting mouse clicks in Unity UI Beta

I want my game script to detect mouse clicks everywhere on my screen, except one corner where I have a pair of buttons to control the sound and will be handled separately. To help identify this ...
1
vote
1answer
86 views

Collision detection across multiple components

I have been reading this article: http://gameprogrammingpatterns.com/component.html which describes how a game object should be constructed out of components. It also encourages the decoupling of ...
1
vote
1answer
107 views

Animation-based Collision Boxes

Background I'm currently working on a top-down 2D game, roughly similar to something like Zelda for the SNES. Certain game entities such as the player or a typical enemy will consist of multiple ...
3
votes
2answers
181 views

Implementing one-way platforms in Chipmunk

I am making game in cocos2d-x, but it's the first time I am using a physics engine i.e. Chipmunk. (It's built-in to cocos2d-x.) I want to make a one-way platform: When my character jumps into a ...
0
votes
1answer
106 views

Unity Guitext object always triggering a collision - 2D

I have a guitext object which I can drag. I have attached a 2d rigid body. I have also attached the collider with the following code: void setCollider() { Rect box = ...
0
votes
0answers
58 views

Very strange trigger behavior in Unity2D (4.5)

I am developing 2d platformer and I've faced with a very strange triggers behaviour in Unity. I have made the enemy that can throw objects into main player. So I have made two empty GameObjects with ...
1
vote
1answer
46 views

Trying to implement bounding box collision

I've been trying to do collision detection using the Intersects() function with two rectangles. I've got a player and multiple enemy's. When the player intersects with an enemy a bool var is set to ...
0
votes
1answer
98 views

SHMUP: who's in charge of collision detection? [duplicate]

Simple design question here: In a Shoot'Em Up, where you often have to deal with hundreds of bullets / missiles / weird flying stuff, who's in charge of detecting collisions? The weapon or the ship? ...
3
votes
3answers
140 views

Lerping character moving up and down slope tiles

So, when interpolating position against a standard 'horizontal' platform, everything works great. What happens is something like this..... (Question continues after graphic) Now, the question I ...
2
votes
1answer
62 views

Pair collision detection on quadtree

I'm planning to use a quadtree for optimizing collision detection. But this quadtree can handle only one type of objects (so I used a base class for my objects). If I use double dispatch after two ...