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
83 views

How to resolve collision between a dynamic AABB and static AABB?

I wanted to ask, how do I resolve collision between 2 cubes - in my case I want to push a moving / dynamic cube (used for the player) out of another static cube (used for the floor or objects in the ...
2
votes
3answers
833 views

Do I have too many colliders on my screen?

I'm running into a situation where my frame rate drops from 70 FPS (on my desktop computer) down to 5 FPS (on my iphone) and I'm trying to understand why. At the moment, I'm only drawing simple ...
0
votes
1answer
47 views

How do I make a time lapse in my code so it updates slower?

I have made some collision if statements, but they didn't work. birdbox3.X += 5; birdbox3.Y -= 5; if (birdbox3.Intersects(Banner1)) { birdbox3.Y ...
0
votes
2answers
372 views

Wall jumping collision detection anomaly

I'm creating a game where the player ascends a tower by wall jumping his way to the top. When the player has collided with the right wall they can only jump left and vice versa. Here is my current ...
0
votes
1answer
40 views

to calculate rect moving in curveed path collision detection

i trying to find the best way to use collision detection between rect moving in curved path: here is example of what i have i found few methods and i have hard time to find what is the best way i ...
0
votes
1answer
54 views

Collision Detection algorithm using Line Detection

For a 2D physics sandbox I am working on, I need a way of detecting detecting a collision using lines. This sandbox uses a class called Particle, which has a x and a y (stored as a struct called ...
1
vote
2answers
71 views

Breakout Collision Detection: Ball gets trapped inside block

I'm writing a breakout clone where blocks to hit can be of various sizes and the projectile can move at different speeds, and I seem to be having some trouble getting the collision detection perfectly ...
3
votes
1answer
134 views

Determine wheter an octree node needs to be continue

For collision detection (moving vs. non-moving) in my current project, I decided to implement an octree approach after the preselection. The only collision detection I'm currently using is a ...
0
votes
0answers
28 views

I'm getting an ArrayIndexOutOfBounds Exception and I don't know why. Can someone shed some light? [on hold]

This is my first time making a 2D game. The code is in Java. I have a character that can shoot blasts at zombies, and this is how I have been dealing with the collision detection between the blasts ...
0
votes
0answers
12 views

Does unused 2D colliders in Unity affects performance? Is an Edge Collider more performance friendly than BoxCollider2D?

I am using a lot of gameobjects for my platformer that uses BoxCollider2D component to make the scene floor. But only an a selected set of gameobjects actually have some interaction with the player, ...
0
votes
1answer
140 views

Collision detection doesn't register until player sprite jumps

I have implemented a shooting mechanic into my game, and the act of shooting works fine. The shooting work is done in my "game1" class. The issue that arises is when I incorporate collision detection ...
1
vote
1answer
180 views

collision in different layer

I have a game object called game object 1 on screen. It holds an image called red . when i drag an image called "animal" on a game object 1 collision happening fine and destroys the "animal" in same ...
0
votes
1answer
67 views

Collision-Detection glitch

Here's my project I am currently making: http://murplyx.net/sss/ Press 'D' and hold, and as you can see the Box just tunnels through one of the Line Segments. I have a swept test implemented, so why ...
2
votes
1answer
25 views

Collision detection between axis-aligned bounding box and bitmap (pixel perfect) terrain

Working on a Worms-type game, I have my objects in bounding boxes and they sit on the pixel terrain. Currently I am able to successfully do the collision detection for objects when they enter the ...
5
votes
1answer
247 views

Get normal dependent on collisions position

As I hask ask here I'm working on how my objects can move over the terrain and other objects. My proposal and also an idea in the answers was to calculate the rotation from the object with the normals ...
0
votes
2answers
95 views

How to stop objects pushing each other away on collision?

I'm creating something along the lines of Super Smash Brothers. There's a problem with the collision between the two players and projectiles. We have rigid body on the characters and projectiles and ...
0
votes
1answer
37 views

Rotate a plane defined by its normal and its distance

First apologies for the amount of pictures, it's a bit hard trying to explain my problem without pictures. Hope I've provided all the relevant code. If you feel you want to know about how I am doing ...
0
votes
1answer
36 views

Why the triangulated body in box@d as a sensor is not treated as one but separate triangle bodies?

I am making simple game - kind of race game, where you see from the "sky" your sprites with circle Box2D bodies attached and they have to move along some path/track. My idea was to detect if they will ...
0
votes
1answer
296 views

Game object position issue in unity3d

I have a set of objects placed on the same layer where all the objects are invisible except one .When i drag an object in to a selected area the current dragged object get destroyed and the object ...
0
votes
0answers
33 views

LineRenderer is not collide [closed]

I am trying to make a jumble word game in which there are number of English letters in matrix form and the user needs to make a proper English word by drawing a line between letters. The line can be ...
0
votes
0answers
22 views

Sprite collision Rectangles LibGDX

I have a big problem with my sprite top collision. Here ismy constructor public CoolGuy(){ full = new Rectangle(0, 0, 50, 98); bottom = new Rectangle(0, 0, 50, 15); top = new Rectangle(0, ...
0
votes
2answers
78 views

Basic 2d platform collision detection algorithm has a slight bug (Java)

I'm trying to implement collision detection between Player (the main character) and a Platform. They are both modelled as rectangles; when player hits the side of a platform he should bounce off it ...
4
votes
2answers
270 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 ...
5
votes
4answers
6k views

How do I find the intersections between colliding circles?

I want to find whether 2 circles with radii r1 and r2 intersect, and if so, where they do so. Is there a simple solution?
16
votes
2answers
4k views

How do I test if a circle and concave polygon intersect?

I have a polygon (sometimes convex, but often concave), and a bunch of circles with different radii. How can I find out if a circle is intersecting/overlapping with the polygon? I could split my ...
0
votes
2answers
723 views

Java collision detection and player movement: tips

I have read a short guide for game develompent (java, without external libraries). I'm facing with collision detection and player (and bullets) movements. Now i put the code. Most of it is taken ...
0
votes
0answers
45 views

I have an array of blasts and an array of zombies, how can I efficiently detect collisions? [duplicate]

I have an array of blasts, and an array of zombies, but I'm struggling to find a way to efficiently detect collisions and remove both the blasts and zombies that have collided. Any suggestions? ...
0
votes
1answer
37 views

Determine if Plane is seen by Camera

If I have an arbitrary plane (center and normal) or a quad (center, normal and width and height) and a camera (frustum, projection & view matrix, etc). Then how would I go about calculating if the ...
0
votes
1answer
69 views

Find closest point on NavMesh if current target unreachable

I have a mock environment set up with a cube that has a specified "Not Walkable" layer. I'm using NavMeshAgent and NavMeshPath to set destinations of the player. The way I'm setting paths is by ...
0
votes
1answer
638 views

How do I add a Rigid body and a box collider component to a Texture2D?

I am making a snake game. I'm basing it on a basic tutorial game, which does no collision detection, wall checking or different levels. All snake head, piece, food, even the background is made of ...
0
votes
2answers
134 views

How to move a car over an environment

At the moment I'm writing a little OpenGL application. For now I have a car which can drive down a road. This works really good because I simply put the car on the street plane. Now let's say on the ...
4
votes
6answers
1k views

Should my game handle collisions in the Player object?

I'm making a 2D platform game. Right now I'm just working on making a very generic Player class. I'm wondering if it would be more efficient/better practice to have an ActionListener within the Player ...
-1
votes
0answers
38 views

Problems with cube bouncing off walls [on hold]

I've been making a game for some time and I need help with the bouncing off walls and players. public class Ball extends Entity { private final int WIDTH = 8; private final int HEIGHT = 8; ...
0
votes
2answers
85 views

Collision detection with moving tilemap

I have a player whose who's sprite is 48* 32. I know the player's position. The player can move up and down based on user input. I have a tilemap which moves. Here is an example of the array I use to ...
0
votes
1answer
140 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
42 views

How can I handle ball interaction with lanes in a pinball game?

In a pinball game, how can I handle collision or constraints on the ball for convincing movement on those highway rails/tracks? I assume using physics and a mesh collider would not work, even when ...
1
vote
0answers
50 views

Collision Detection Between 3 or More Objects

Say I have a 2D grid of particles, and I wanted to find out if any of them were colliding. In my head I have come up with a system where you check every possible location for each particle in that ...
-1
votes
1answer
24 views

3D OBB vs OBB Collision Detection and Response

I need to know how to do collision detection and response for 2 3D OBB objects. I will also need to be able to have certain objects disabled (no collision, incase I need to test something like a ...
1
vote
1answer
159 views

How could I implement 3D player collision with rotation in LWJGL?

I have a problem with my current collision implementation. Currently for player collision, I just use an AABB where I check if another AABB is in the way of the player, as shown in this code. (The ...
0
votes
2answers
80 views

Unity2D Collision Issue

I have a crate setup (in pic below) with a rigid body component, box collider and 3 circle colliders(they allow me to push the crate most of the time without getting stuck on the floor textures which ...
-1
votes
1answer
30 views

how to determine wall direction with information of normal and incoming direction

what is formula ( and theory behind) used to determine wall direction with only knowing the normal of wall and incoming direction object. in this thread example :Collision detection - Smooth wall ...
0
votes
1answer
52 views

Double buffer - Managing Collision

I'm thinking about how I should manage collisions in my game. I'm thinking about having a "Collision" class that checks for collision, and in case takes actions to resolve them. My problem is this: ...
0
votes
1answer
339 views

Using PhysX, how can I predict where I will need to generate procedural terrain collision shapes?

In this situation, I have terrain height values I generate procedurally. For rendering, I use the camera's position to generate an appropriate sized height map. For collision, however, I need to have ...
2
votes
1answer
54 views

Box2D Issues determining the side of collision

I'm trying to determine which side of my object a collision is happening. In all of my searching, I have found 2 different proposed solutions, but each one has a major issue. I'm hoping that someone ...
0
votes
1answer
1k views

Slope polygon collider 2D causing box collider 2D to 'bump' while sliding on it

I'm doing procedural terrain generation. So far I've created the mesh, and attached a 2D polygon collider to it. The terrain is made up of hills going up and down. After doing so, I put a 2D rigid ...
1
vote
3answers
77 views

unity destroy enemy when jumping on it

I am creating a 2D platformer using Unity3D, I want to have the player destroy enemies when it jumps/falls over them (just from the top). But I have been having problems trying to implement this. I ...
0
votes
1answer
428 views

Swinging a sword in Xcode with Sprite Kit

I'm working on making an RPG in Xcode, and I'm having a major gameplay issue when it comes to having my character swing his sword in a way that is realistic and gameplay compatible. Right now, when ...
1
vote
3answers
36 views

XNA - How to use One Rectangle in sprites for collisions

I'm new to XNA and game development in general. If I want to make an object solid so my character cannot pass through it, I would use several Rectangles to make the collision more "realistic" What I ...
2
votes
1answer
183 views

How to impale and stack targets correctly according to the collider and its coordinate?

I'm making another simple game, a catch game, where a spawning target game object must be captured using a skewer to impale it. Here how: At the start, the falling object (in red) will fall in a ...
2
votes
2answers
215 views

Sprite Kit - containsPoint for SKPhysicsBody?

I have a ball bouncing around the screen. I can pick it up and drag it onto a "bucket". When my touches finish, I use the containsPoint function to check and see if I have dropped the ball onto the ...