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
1answer
23 views

Collision response callback

First at all, I'm not asking how to handle or detect collision. I already have that. My actual situation is, I have a system collision and I detect the collisions. Every collision detected is store ...
0
votes
0answers
27 views

My “puck” model object falls right through the “table” model in jmonkeyengine

So I am trying to learn Jmonkey, I have understood everything so far, and I thought i understood how to make objects solid, so things cant go through each other. When i created my Collision shapes, I ...
10
votes
2answers
2k views

How does one perform collision detection on objects made of many small triangles?

I understand that any shape can be created (or approximated) by smaller triangles. Any rectangle can be created by 2 smaller triangles. Any circle can be created by many thin "pizza slice" triangles. ...
1
vote
3answers
92 views

Detect if two objects are going to crash

i am working on a car game where i am to create an AI, in the game there are other cars and a few objects moving around that i do not want to crash with, i have the speed, position and direction of ...
1
vote
0answers
27 views

Using Box2D in LibGDX, is there a reason a fixture set to be a sensor would only -sometimes- detect a collision?

I am working on a 2D game in LibGDX. Currently, I am testing interactions between a player's weapon and enemies - in particular, a sword and an enemy monster. The player has a hurtbox and the sword ...
0
votes
1answer
48 views

After collision of two objects change the sprite and move in its direction

I've searched a lot for this question but there was no answer that could solve the problem I'm having. I'm new to unity and a very naive developer.I'm making a game in unity using c# and it's like a ...
0
votes
2answers
35 views

onCollisionEnter2D not behaving as expected

I have two game objects. They both have a Rigid Body 2D and a Box Collider 2D components. One of them also has script component. Below is the full script using UnityEngine; using System.Collections; ...
0
votes
1answer
18 views

How can I get the “SelfActor” in OnBeginActorOverlap?

The signature it takes is void ( AActor* OtherActor ) However, The actor that is handling this event is not involved in the overlap. How can I access the actor that owns this delegate? Assuming I ...
0
votes
0answers
25 views

Collision Detection acting weird

I started learning programming in java. and I've decided to make a simple game but, got a problem in collision detection. The problem here is that the collision detection is sometimes not working. ...
0
votes
0answers
17 views

What is wrong with my SAT collision code [closed]

Here is the code for my SAT collision test: float length =rect2.getPosition().x rect1.getPosition().x; float halfWidth1 = rect1.getSize().x/2; float halfWidth2 = rect2.getSize().x/2; float gap = ...
2
votes
2answers
47 views

Subdived objects in different shapes

Currently I'm working on an Android OpenGL 3D game and now I want to implement a collision detection. For this I want to use oriented bounding boxes but here is my problem. For a normal oriented ...
0
votes
1answer
57 views

Fast(er(est)) fullscreen/scene collision detection technique (“selection buffer”)

My vertex format has a float4 Flags element used to pass miscellaneous data to shaders. Each mouse-collidable object that is rendered has a unique ObjectID that is written to an ObjectID-rendertarget ...
0
votes
1answer
52 views

How can I split up a large model into an octree codewise?

For collision detection, I am attempting to split up a large model into an octree. If we take this black thing thing to be the ship (104,000 vertices): Then I would like to split up the faces I ...
0
votes
1answer
46 views

Fast mesh collision 3D (C# XNA)

I'm trying to write a simple program where a 3D landscape can be walked about with a basic camera. However, I've found it very difficult to do even simple collisions with my terrain. I'm wondering if ...
0
votes
1answer
58 views

Handling (spawning/removing) entities in SFML

I am unsure which method to use to handle my enemies in SFML. The idea that I am trying to recreate is to spawn enemies every so many seconds. Initially I wanted to do this using a vector such as ...
0
votes
0answers
44 views

resolving per pixel collision issue

In space invader, I'm doing bullet to barrier intersection using rect to rect, then I'm testing the first bullet's impact pixel, if it's green I blast a circle, if it's black, it continues travelling. ...
1
vote
1answer
49 views

How to implement this collision detection function?

I would like to know how to implement this collision detection function, but I'm not even sure what it's called. The input shapes are 2D convex polygons, with an optional "rounding radius": imagine ...
0
votes
1answer
45 views

missiles skip in collision detection

I'm trying to work on spaceinvader. I have problem that missiles or the bullets skip frames due to its fast speed. I tried to use the previous position of the bullet in the collision check, but still, ...
0
votes
0answers
42 views

Problem with collision detection , Libgdx [on hold]

I have a main character called main_sprite and I need to check for collision with another object called enemySprite . In case there is a collision, it should set velocity to 0. Here are my classes : ...
0
votes
2answers
61 views

Fast Ray Sphere collision code

I am looking at here and while it's well organized a lot of links are broken: http://www.realtimerendering.com/intersections.html I am trying to find fast code that will give me the hit point and the ...
0
votes
2answers
52 views

Moving OBB vs. triangle intersection test

Requirements: to write a test function that, given a moving OBB (oriented bounding box) and a triangle, returns true whenever the OBB hits the triangle. The OBB is described by its half extents (h1, ...
0
votes
1answer
55 views

OnCollisionEnter2D incorrect contact point?

I am trying to shoot a bullet (rigidbody2d, boxcollider2d) to another enemy object (rigidbody2d, kinematic, circlecollider2d). I want the collision point between these two. When they collide, i want a ...
1
vote
1answer
44 views

How do I make my main character move towards an object? LibGDX/Java

What I want to happen is for my player to bounce from spring to another. For example take the illustration below: Here's my code (what I've tried to do so far). This gets called in an ...
0
votes
1answer
49 views

Unity Collision Difficulties (How do I make a ground in unity with lots of pieces that doesn't have poor collision?)

So I'm working on this game that I came up with the idea for while watching the Unity Roll-a-ball tutorials. So it's probably important to note that I'm extremely new to game design and I don't have a ...
0
votes
3answers
153 views

Collision between AABB and Circle

I'm programming collision systems for a 2D game engine. The idea is that different systems can interact with each other. So one of the cases would be check collisions between axis aligned bounding box ...
0
votes
0answers
19 views

Colliding wiith a smooth line of blocks

I'm having a strange problem. I'm creating a 2D platformer, and creating the gameplay map by reading a csv file and placing prefabs of the appropriate type on map. One part of the map is a simple ...
0
votes
1answer
18 views

Collision detection using gluunproject

I recently came across the game turbo tunnel. I want to make a similar game. only thing that stands in my way is the collision detection. I first thought of learning plane line collision detection. ...
1
vote
1answer
66 views

Help with Resolving Pixel Perfect Collision

Hi I'm having trouble resolving "Collision detection between axis-aligned bounding box and bitmap (pixel perfect) terrain on a Worms type game". (Read previous question to find more information about ...
0
votes
1answer
58 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
1answer
67 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
31 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, ...
1
vote
2answers
91 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 ...
2
votes
2answers
106 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
39 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
41 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
152 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

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
128 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 ...
5
votes
1answer
256 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
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
50 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
143 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
46 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
36 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
53 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
92 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
1answer
35 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
57 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
109 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
39 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 ...