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)

0
votes
0answers
14 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
66 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
37 views

How can I create a spacial grid? [on hold]

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
47 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 ...
4
votes
3answers
63 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
42 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
13 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
12 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
35 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
37 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 ...
1
vote
2answers
23 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 ...
1
vote
1answer
48 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
42 views

Detecting Collision in Next Step when Collider is rotating [Gamemaker]

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

Finding past posts [migrated]

Where is the advanced search on this site, or where can I look up my questions? Having asked this question I realise I might never see it again!
0
votes
1answer
47 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
24 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
74 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
42 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
42 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
138 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
88 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 ...
7
votes
1answer
104 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 ...
6
votes
0answers
77 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
84 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
26 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 ...
0
votes
0answers
25 views

Unity : How to handle compound colliders 2D physics

I´m making a small game where the basic game mechanic is dragging things around the level . My Player G.O. is the one who drags the other objects around the level . This G.O. (the player GO) has a ...
0
votes
0answers
21 views

Unity3D - Collider jumps when I hit play

When I press play, my collider jumps down and offsets everything. I believe its due to the animator as it doesn't happen when its not present. I'm using the stock Unity animations. Here is the ...
0
votes
1answer
38 views

My polygons only register a collision if they are the same shape and directly over top of each other

I'm trying to learn about 2d polygon collision detection/handling and have ran into a snag. After running through lots of tutorials and sample code I've attempted to implement my own polygon class ...
1
vote
2answers
61 views

Area attack collision resolving

I'm planning to write little 2D go-right-and-swing-your-sword game. When i started to write my ideas on paper i've come across a little problem. Let's say i'm using magic spell, ex. fireball which ...
3
votes
1answer
47 views

Collision resolution when moving in two directions

I am making a bomberman clone and I'm having problems regarding moving on both x and y axis (pressing down+left, down+right, up+left). Here is a video to demonstrate the problem. I use Tiled for the ...
0
votes
0answers
18 views

collision detection with rotating Sprite

Im using Libgdx. I have a space ship sprite rotating around the earth trying to avoid incoming asteroids. The ship is being rotated by setting it's origin in the earths center. How do i detect ...
0
votes
1answer
44 views

Tile-based collision problem with corners

I am currently making a tile based collision system. But I encountered a big problem I can't seem to figure out. Use the image bellow for reference. Gray lines represent the border between tiles. ...
1
vote
0answers
20 views

Collision destroy a cube when player collides [closed]

Unity- I have a mesh named and tagged as player I want that when it touches a Cube it should get destroyed C# script I need ....ty
0
votes
2answers
69 views

Collision works except for when coming from right side

I am trying to make a bomberman clone. I'm having problems with the collision on the walls that is not on the sides of the map (see image). When I come from the right (going left), the red square ...
3
votes
1answer
69 views

How to solve Sweep and prune false positives concerning large floor plane

I am developing a 3d sweep and prune module for a project, and it is producing false positives. The pair generation code is as follows: for (unsigned int i = 0; i < mXExtents.size(); i +=2) ...
5
votes
1answer
117 views

How to detect collision only in non-transparent texture?

I am developing a game using libgdx. I am trying to detect the collision between bee and tube. I am using the following code to detect the collision. if(player.getBounds().overlaps(boundsBot)){ } ...
0
votes
1answer
42 views

AS3 .hitTestObject() not working with Tween function

(This was originally in an other senction but many told me to ask here, hopefully someone can answer this) I am having a major problem in my new browser app. Okay so I made game where different cubes ...
0
votes
1answer
55 views

2d raycast collision problem

I am currently making a 2d top down game in unity and have stumbled upon a problem with my raycast collision. I want my green player to stop moving when colliding with a wall, therefore i made my ...
0
votes
2answers
43 views

Cannot detect input in void OnCollisionEnter()

Code: void OnCollisionEnter() { if (Input.GetMouseButton(0)) { // do something } } Of course, this code does not work. What I intend to do: "After collision, if the ...
0
votes
1answer
45 views

Copy a gameObject's collider at runtime (Unity)

I'm working on a small Unity 2D project in which I need to modify the collider of the player at runtime. I'm using Physics2D.Raycast to find the collider and then what I'd like to be able to do is ...
-1
votes
1answer
61 views

XNA collision detection between Lists

I have 2 lists, one is for meteors and second is for bullets. I have problem with collision detection between them, this is my code for meteor spawning: public void LoadMeteors() { ...
0
votes
1answer
25 views

Mismatch between scene view and game view

In my scene view, it looks like the player is correctly lined up with the map. But when I see it in the game view, it's off. You can see the Game view in the top-middle, and the Scene view in the ...
0
votes
0answers
26 views

Circle velocities stay the same after elastic 2D collision

I am following this paper in trying to create elastic 2D collisions among two circles. The problem is that my end velocities are the same as my start velocities. I've looked over my code and don't see ...
0
votes
2answers
100 views

OnTriggerEnter() without rigidbody?

I know this is an old question and it has been answered for a lot of people. Unfortunately none of the solutions apply to the problem I seem to have with rigidbodies. I have a moving AI character and ...
2
votes
1answer
60 views

Mesh-level acceleration structures for collision detection when mesh instances can be rotated, scaled and/or resized

Short version: in the mid-phase or narrow-phase of collision-detection, does any acceleration structure organizing the mesh's vertices (e.g. AABB-trees, Octrees, Quadtrees) work for the mesh's ...
0
votes
0answers
23 views

Java Rectangle Collision Glitch

I have a platformer type game where I have a level builder(reads a .png file and converts into a level where there are rectangle boxes). I have rectangle collision on the boxes but when I make my ...
0
votes
0answers
35 views

Problem with Collision Detection

So I am adding collision detection into my game but whenever I start the game I get a rendering crash saying that there is a 'Game.update() failure - check the game code.' I have repeatedly tried to ...
1
vote
0answers
35 views

Implementing Separating Axis Theorem in 3D with C++/OpenGL

Using an Octree data structure provided to me by an acquaintance that gives min/max bounding box values, I've been able to write an algorithm that takes the global centre points, face normals and half ...
0
votes
1answer
34 views

Why is my counter not incrementing when OnTriggerEnter is called?

I have a script that handles the destruction of game objects based on what they collide with. I am trying to count the number of objects destroyed when they collide with specific objects. However, ...
-1
votes
1answer
51 views

collsion detection [closed]

I am making a 2D bubble shooter game but m stuck on a point. I have printed those balls in a 2D space using 2D arrays. Each row has 3 inputs one is x coordinate,one is y coordinate and one is the ...