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
1answer
120 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
51 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
90 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
80 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
41 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
91 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
52 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
50 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
215 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
145 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 ...
9
votes
3answers
184 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
105 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
66 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
34 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
25 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
43 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
66 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
59 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
31 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
61 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
24 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
75 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 ...
4
votes
1answer
88 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) ...
6
votes
1answer
171 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
74 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
107 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
55 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
112 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
68 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
49 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
32 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
177 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 ...
3
votes
1answer
78 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
29 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
39 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
52 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
39 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
53 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 ...
-1
votes
1answer
45 views

LibGDX - Map Boundaries

Synopsis Well, I'm making a little top-down JRPG and today I was like 'Yeah, I'm gonna bust out this whole map collision thing!'. I failed. Problem So I went on the internet and looked up 'LibGDX ...
0
votes
2answers
77 views

Delaying certain actions/functions in libgdx using Timer?

Hello I am trying to delay a part of the processes in my game, but it happend that I use one of my variables in an inner class so I have to make it final, but by making it final I can't assign new ...
0
votes
1answer
52 views

Storing color and position (height and width) in an array which can be changed accordingly (bubble shooter)

How can I store the colors and position (i.e the position of the balls in bubble shooter game) using an array? I first tried using a simple loop but I think it won't work when I need the balls to ...
-16
votes
1answer
398 views

How can I “squeeze” a game object when it is pressed between two others?

I am trying to "squeeze" a game object when it's pressed between two other objects (e.g., "squeezer 1" and "squeezer 2," below) that continue to move towards eachother. I wish to reduce width of the ...
3
votes
1answer
128 views

Resolving collisions with float precision errors

I'm facing a problem when I try to resolve the collision between two units using floats as positions of the units in my game. I am detecting the collisions using the SweptAABB algorithm and if there ...
0
votes
1answer
100 views

OnCollisionEnter is called over and over again

Currently I'm trying to let the player place a GameObject in the world. You can imagine this like a RTS game where you can place a building you have just build. My problem now is, in order to avoid ...
2
votes
1answer
47 views

Call function via ContactListener

I've been creating a game on my own in LIBGDX, BOX2D and there' s a problem I can' t solve. When two World bodies collide, method "beginContact" is called in MyContactListener class that implements ...
2
votes
0answers
77 views

How to detect collisions with a material in Unity 5?

I've got a simple car game with 3 different surfaces: grass, tar and sand. I have a basic skid smoke system, but I want the color of the skid smoke to change depending on the surface, for example on ...
2
votes
1answer
127 views

Simple 3D OBB-Collision (DirectX9, C++)

I'm trying to implement a simple OBB vs. OBB collision detection! I don't need to know where the collision occures, I only want to know whether a collision occures. The problem is, that after lot of ...
0
votes
1answer
77 views

Collision problem with multiple tiles (rectangles)

I think that I found what the problem is, see below So I'm working on a collision system and I use multiple tiles in my project, each with a collision box. The player also has a collision box. I'm ...