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
22 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
1answer
41 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 ...
0
votes
0answers
10 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
2answers
59 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 ...
1
vote
1answer
44 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
1answer
21 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 ...
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
2answers
88 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
0answers
30 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
20 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
63 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 ...
3
votes
1answer
185 views
+50

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
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
2answers
130 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 ...
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
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
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 ...
0
votes
2answers
83 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 ...
-1
votes
0answers
37 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; ...
-1
votes
1answer
29 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
51 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: ...
1
vote
3answers
68 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 ...
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 ...
0
votes
1answer
65 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 ...
1
vote
1answer
65 views

OnMouseUpAsButton not always called

I'm working on a 2D implementation of Free Cell in Unity 4.6.1, and I'm having trouble getting my click-detection code working consistently. The code below should be called every time a card is ...
1
vote
1answer
85 views

Player Gravity Questions

I've made it so that all entities have complex box colliders for hit detection purposes. These entities also have character controllers on them. The problem? Gravity, or lack thereof. When the ...
0
votes
0answers
22 views

Is there a way to rotate an Ellipse in libGDX for collision detection purposes?

I'm trying to avoid having multiple overlapping Circles for a UFO-shaped sprite. Two Ellipse objects will perfectly cover the shape of my UFO, but I want to tilt/rotate the UFO when flying left and ...
0
votes
0answers
24 views

Check if object is at position, then move player as close to object without colliding, or re-direct player?

Basically what the title says, I'm using the mouse position to move the player around the screen, and the issue I'm having is that if there is, let's say, a boulder where I'm trying to run, how would ...
0
votes
1answer
66 views

Unity: Smooth collision

I'm making a topdown 2D RPG in Unity. All moveable objects have Rigidbody2D-components with gravity set to 0, linear drag set to 5 and different masses. Walls are stationary boxes with BoxCollider2Ds. ...
0
votes
1answer
39 views

How to retrieve vertex information from ID3DXMesh

I need to know the position of each vertex (and triangles) from a mesh (a pointer to ID3DXMesh, created by calling functions like D3DXCreateBox, D3DXCreateTeapot and D3DXCreateSphere) to perform some ...
0
votes
2answers
47 views

How to flick gameObject using Touch?

I've been searching for a solution for my problem for a while on the web, but i didn't find anything that work properly What i want to do I have a bouncing ball and I want to let the user flick it ...
0
votes
2answers
47 views

Collision detection between draggable object and world objects?

I have a game I'm making in Javascript that will involve combining items by dragging and dropping them onto each other. Think Alchemy or similar. So far, so good, but I hit a snag while trying to ...
0
votes
1answer
38 views

Is it possible to tile box colliders without causing “false” collisions in Unity3D?

This is in regards to something like a sidescroller where you have a tiled map where each tile uses a 2d box collider. If you use a 2d circular collider as an example for your character, as it rolls ...
3
votes
1answer
238 views

Acute corner - Collision Detection

So I have set up a Swept test for AABB vs Line Collision that works fine, now the problem is that I have to deal with acute corners, where this happens: As you can see the AABB just falls through ...
0
votes
1answer
41 views

How to determine whether a given line intercepts another

I have a collection of lines: List<Line> _lines; Each has the properties: X1, X2, Y1, Y2 How can I determine whether any given line in the list (Line[n]) intercepts, at any point, any other ...
0
votes
0answers
62 views

Collision detection in JavaScript Canvas game - Issue with 'if' statements [duplicate]

I am currently developing a simple browser-based game and seem to be on the cusp of collision detection that doesn't just return the player to where they were before, but actually will slide them ...
1
vote
3answers
86 views

How Efficiently preform collision detection in NxN rectangle grid

i have simple level that constructed from NxN rectangle grid some of the rectangles are walls and some of them are the path the player allowed to move only on the path they are also rectangle from the ...
-1
votes
1answer
82 views

How can I get “Good enough” collision for entities? [closed]

I am developing a Pirate ship fighting game. It's a great concept: Ships firing cannonballs, sinking each other, having to work as a team to complete the mission... But.. I've tested it with about ...
0
votes
0answers
17 views

Play soundeffect only once?

I am creating a game in XNA and when there is a collision between two objects a siren will sound. I have pixle-colliding between the objects and if several pixles collide the sound plays several times ...
0
votes
0answers
21 views

How does collision detection work? [duplicate]

I was curious on how hit collision works in games. I know there is a simple method that gives every object in a 2D or 3D world a recengular hitbox that makes it easy to detect a collision, but when ...
0
votes
0answers
52 views

Java Collision detection

Hello have a game where you look for key cards. Which allow you to open certain doors. for example if u have a red key card you can open a red door. The problem is that when I don't have red key ...
0
votes
1answer
39 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 ...
12
votes
6answers
2k views

What's the fastest way checking if two moving AABBs intersect?

I have two AABBs that are moving, what's the fastest way to check if they will intersect under a frame? By moving I mean not just to check with the usual rectangle intersection method, I mean some ...
1
vote
1answer
33 views

Applying statements to a single instance in Game Maker?

I'm currently in the process of making a platformer, and am currently in the process of creating "depth" into my game, by making Up/Down-W/S control your depth. (Come closer to screen, go further). ...
0
votes
1answer
83 views

Ray->triangle collision math seems to not work?

First time asking, pardon any mistakes I make :) I am programming a game from scratch, and the collision detection is giving me issues. I have AABB in place to check proximity, and if that reacts, ...
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 ...
0
votes
0answers
42 views

Gravity around a sphere with rotation? (Blitz 3D)

I've been making this space/moon type FPS game with Blitz 3D and I can't seem to get gravity working perfectly. Right now, it works, however when I go farther on the moon, I see that my character is ...
1
vote
1answer
30 views

GJK point-in-tetrahedron - capping the number of searches?

The very informative mollyrocket video has given me quite a lot to work with, but one thing that the video seems to suggest is that the algorithm should ideally run until it definitely determines ...
0
votes
2answers
85 views

Accessing colliders from one script C#

I want to access specific colliders(to see if they are been clicked) from one script insted of making multiple scripts for every collider.How? I am using unity. using UnityEngine; using ...