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
2answers
81 views

How to destroy bullet on collision but only after it makes the collided object to bounce?

I made a scenario that shooting a bullets on crates make them both bounce nicely (both the bullet and crates are RigidBody2D & Colliders). When I use OnCollisionEnter2D to destroy the bullet when ...
1
vote
1answer
64 views

How could I implement destruction of bases in Space Invaders type game?

What approaches could you use to implement the the gradual destructions of bases/shields in a top down shooter type game similar to Space Invaders? The simplest approach could be to use a series of ...
0
votes
2answers
34 views

how to recieve a trigger with collider or recieve a trigger with collider in unity

i know if your object has a Collider you can sense another Collider with OnCollisionEnter function or... and you can sense another collider with trigger with OncollsionEnter function and... but i want ...
0
votes
1answer
41 views

Play an effect where a sprite touches a trigger

I have a sprite-based GameObject in Unity to which is attached a RigidBody and a Collider2D. When this GameObject comes into contact with a particular Collider2D Trigger, I want a particle effect to ...
0
votes
2answers
63 views

Picking a 2D Box Collider with the mouse in Unity

I have a scene with a bunch of 2D doors that have 2d Box Colliders (no trigger) on them and that live on a Canvas. I would like to be able to click on them with the mouse, but have had no luck. ...
0
votes
0answers
33 views

Doing collisions on both axis with java overlap

I'm making a top down game from scratch and just found out about the java rectangle overlap method that would work great for collisions. However, after the overlap happens, I need to check for which ...
0
votes
0answers
22 views

Pleats and folding

We have a C++ module that produces mesh dynamically and simulates it with a physics engine. We want pleats on the surface of our mesh, pleats that remain sharp and folded during simulation while ...
0
votes
0answers
53 views

HingeJoint shaking, Unity3D 5

I have player with CharacterController and door with HingeJoint, I also have enemies with NavMeshAgent. When someone gets inside this door, it starts shake, jitter, rotating etc. For player I use this ...
1
vote
1answer
76 views

How to calculate distance of travel needed get achieve speed x?

I have a boat traveling at 20 meters/second approaching destination x. Destination x has a range radius of 10 meters. What I would like to do is make sure by the time the boat arrives within 10 meters ...
0
votes
4answers
126 views

How to do one-way collision?

I would like to know how can I do one way collision. It's the collision common in mario's games and many platforms. I try to do an code but I cannot post because it's part of a paid game. Basically I ...
0
votes
1answer
83 views

Unity 5.3 C#: How to disable multiple game objects with one collision?

I'm making a top down perspective game with a gunner automatically moves on a pre-set path, and you shoot and destroy targets to remove barriers. The idea is that you control the bullet's direction ...
0
votes
0answers
29 views

How to find visible planes in a world of boxes

I have a world where each object is a box: Each box has position x, y=0, z, dimensions width, height, depth. The boxes are never rotated. Each box is composed of 5 planes (left, right, front, back ...
0
votes
1answer
223 views

AABB Collision Problems in SFML

I have a problem with AABB collision. I am making a top down rougelike in SFML and my collision algorithm does't quite work properly. HERE IS A GIF OF THE PROBLEM. It mostly works, except for when ...
0
votes
1answer
63 views

Issue with detecting collisions in Pong

I've been working on making Pong in OpenGL and SDL and currently have both paddles and the game ball set up properly. I have an Object (or Entity) class which is used to instantiate each of the ...
0
votes
0answers
32 views

LibGDX & Box2D Actor Collision

I'm working on a LibGDX project, and I was wondering about the best way to define actors in a collision. I know this is probably a common question, but specifically I'm interested in beefing up one ...
1
vote
2answers
53 views

HardonCollider Error: attempt to call method 'addRectangle' (a nil value)

I want to add collision detection mechanism to my game, which is written in love2d. As i do not want to implement my own algorithm, i have found a HardonCollider library to do the heavy lifting for ...
0
votes
0answers
44 views

How to get many rectangles and join them together into one polygon

I'm using LibGDX to make a platformer game in which I have a tilemap containing lots of instances of a Tile class. From the Tile class you can return a rectangle which represents the tile's position ...
0
votes
0answers
55 views

Making the CCTV and its Detection Area Pointing to the Player on Unity 5

I am now playing with the Unity Stealth project. Goal I want to make the CCTV pointing to the player (a sphere) instead of playing its rotation.y animation when the CCTV detection area is detecting ...
1
vote
0answers
34 views

2d Circle different ARC's Collision detection

The way to detect collision between 2 circles or circle and line . using trigonometry But now i like be able to detect which part of the circle arcs im hitting , for example i divided my circle to 4 ...
0
votes
0answers
45 views

Detect collision without reaction

Okay, so this has been bugging me for quite some time now. I'm making an old school platformer type of game in 2.5D, I want objects to pass through each other, but I still want a collision to be ...
0
votes
2answers
82 views

Get Particular Object's collision status via C# script

My current scripts creates and modifys the location of various prefab objects as they go along the screen. One of the things I want to find out about the active object is whether it has collided with ...
0
votes
1answer
92 views

Libgdx rotate sprite with collision

Im making a game where I have an object in the center of the screen and then balls come out from the sides of the screen. When you touch the screen the object rotates 90 degrees clockwise and it has ...
1
vote
1answer
49 views

Swept AABB Collision and Response Problems

I am working on a simple 2D game, and I am having problems with collision detection and response. I am using code adapted from this article: ...
-1
votes
1answer
90 views

Bullet only removing closest enemy

I'm having an issue with my collision detection code. I'm making a top down shooter and when I shoot, the bullet will only destroy an enemy if it's the closest enemy. The bullet will go right through ...
0
votes
1answer
102 views

My character gets stuck when It's running on a straight level ground

My project is an infinite runner that goes right in a straight line. Sometimes when it just runs without jumping the Player stops. Sometimes the Player doesn't stop. When you jump the Player usually ...
1
vote
1answer
81 views

Check collision with rectangle and pixels

I have done a function to check the pixels collision against two animated sprites, and now I need to check a "Rectangle x animated sprite" collision, but I have no idea how to do this. I tried to ...
0
votes
0answers
16 views

2D Platformer Incrementing Speed Physics/Collision problem [duplicate]

I am currently developing a game on Cocos 2d-x physics engine. The game's mechanic is so that the character goes down faster as the game progresses (a casual game) however, there seems to be a problem ...
-2
votes
1answer
119 views

Destroy object on Collision

I have a strange problem... I need a 2D projectile to destroy itself after colliding with an object. I have used all of the different ways to do this on the internet but to no avail; the object ...
1
vote
1answer
47 views

How can I create a spacial grid? [closed]

I just created a tile map for my game, and its a side profile game. The game looks sort of like Terraria, where there is blocks you can place and break. I want the player to be able to collide with ...
1
vote
1answer
68 views

How do I deal with AABB sweep ghost collisions?

I've been trying to wrap my head around this for some time now. I wrote an implementation of AABB sweep collision detection. I though I understood the idea but it didn't work as expected. I rewrote ...
5
votes
3answers
162 views

Multiple Colliders in Collision

I have an object that has a front collider, left collider and right collider. When a collision occurs, I notice that there are situations where the front collider and left collider/right collider has ...
0
votes
0answers
51 views

Problem with collision detection also affecting collision resolution

Hi I am making a 2d scrolling beat em up, I am working on the collision with obstacles like drums and platforms. So far I have the player jumping and falling from platforms but having problem ...
0
votes
0answers
22 views

Libgdx inaccurate collision detection (no body2d)

So, I am developing a simple 2d game that has no need of body2d or over physics engines. I make my bodies update position by adding a specific velocity to them. The problem arises when I try to make ...
0
votes
0answers
14 views

Pixel collision detection between two images is not working in Phaser.js [duplicate]

I am applying collision between two images. But the two collided images are not taking the pixels to collide with each other. The collided images are overlapping each other but at some point, the ...
1
vote
0answers
40 views

Cell height with heightmap for collision detection

Hello everyone I'm programming a game with c++ and openGL. My world is generated from a heightmap (100x100 matrix with values 0-255) and now I need a function that returns the actual height based on ...
0
votes
1answer
98 views

Rigidbody stuck on the edge of two colliders

could You please help me with that weird bug? I've seen other people's posts about that bug, but I couldn't really understand how to fix it. As You can see, the boxes are standing right next to each ...
2
votes
2answers
45 views

Ball passing through box collider

My ball which has a circle collider 2D component occasionally passes through my box collider2D object. Both objects have rigidbodies attached. I have set a high mass for my box collider and a small ...
2
votes
2answers
86 views

Circle to Polygon collision response

I'm working for collision response for my 2d game. Character is represented by circle and obstacles are represented by Polygons(in my example it would be rotated rectangle for simlification). The ...
1
vote
1answer
74 views

Detecting Collision in Next Step when Collider is rotating

In my Gamemaker: Studio game, I have a collision script for my enemy. The enemy is an alien, oSwarmer, moving through space which is also filled with drifting, spinning bits of debris. Some debris ...
0
votes
1answer
50 views

Collision Responses with many different types

I'd like to write an efficient Collision Response code, that does not use instanceof/type checks that often (if possible) my current implementation is something like this: ...
1
vote
1answer
37 views

MonoGame, sprite to rectangle

I'm bucking the trend and working with MonoGame in VB2015, please don't tell me how brilliant C# is and how I ought to learn that, I really can't be bothered, and all the }}{}{{{}{ drives me insane!! ...
0
votes
4answers
86 views

using loop to detect collision in XNA

Got a problem, with collision detection, I need to detect collision between bullets and meteors using nested loop for this, but it isn't working. } } ...
0
votes
1answer
50 views

javascript efficient collision detection [closed]

I have a processing game where I am having serious lag problems with collision detection. I am using the most effective code I can think of however after about 9 levels in The game gets unbearably ...
1
vote
1answer
49 views

What is the best way to check for intersection of two bounding boxes, given a minimum and maximum Vector3 for each one

I have a BoundingBox object which holds two Vector3's (x, y, z), one for the minimum point and one for the maximum point. (-1.5 0 9 | 1.5 3 10) What is the best way to check for any intersection or ...
2
votes
2answers
180 views

Möller-Trumbore intersection point

I am using the Möller-Trumbore method as part of my (still very basic) collision detection system. The information I'm craving about is the distance from the ray origin and intersection point. The ...
5
votes
4answers
96 views

Dealing with collisions across adjacent static bodies

The Problem: I have the following setup: A, B and C are rectangular static bodies in box2d. p is a circular dynamic body in box2d. The movement of 'p' is solely controlled by the current gravity ...
8
votes
1answer
140 views

In a 2D physics engine, how do I avoid useless collision resolutions when objects come to a rest?

In a physics engine I'm developing (for learning) using love-2d, I implemented collision resolutions in this way: FixedUpdate(dt) // I use fixed timestep foreach collide c1 in allNotStaticColliders ...
8
votes
0answers
146 views

3D collision avoidance: finding the updated velocity vector (outside the “collision-velocities” cones)

I am trying to understand and implement the mechanism of a fully 3D collision avoidance (steering behavior) system for flight movement (six degrees of freedom), currently focusing on circumventing ...
4
votes
2answers
103 views

What should be the code design for interactions management in a game with lots of object?

I'm writing a 2d game for Android in Java using LibGDX. The game consists many interactions between different types of objects. Most of them happen between enemies and bullets. At the beginning, I ...
1
vote
1answer
56 views

Color Based Collision Javascript (Cocos2d-js)

Im looking to make an isometric game...so my partner designed the isometric map (jpg image) along with the map objects (png) on adobe ilustrator... so the thing is i would like to set the player path ...