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)

2
votes
1answer
50 views

Bounding Volumes for Empty Space

I'm creating an Android game that relies heavily on collision detection for a couple of players (at least up to 4). I researched hierarchical structures that could speed up the process. Because I have ...
3
votes
3answers
352 views

Fastest 3D bounding box algorithm

I am at the point in my game where I need to add a collision system. I tried jBullet, and while it did work, it wasn't what I was looking for. I just want a simple way to test if two oriented bounding ...
1
vote
1answer
192 views

Move collider along with model with Mecanim jump animation

I've been creating an infinite runner game in Unity3D for a while and I got stuck in this point that whenever my character jumps using Mecanim system his model (mesh) goes to air but his attached ...
2
votes
1answer
103 views

Continuous Collision Detection

So I'm playing around with the separating axis theorem and collision. Obviously the problem of what face it collided with arose. I need the unit normal which is tangent to that face it collided with ...
0
votes
2answers
72 views

simple solution for 3d collision detection and response

I'm having great difficulty trying to implement collision detection and response in a 3d game What are some simple solutions someone can use to implement smooth collision and response similar to ...
1
vote
2answers
450 views

Unity - Raycast not hitting to BoxCollider2D objects

I'm working on 2D and I have a Quad as background. And some wall sprites over this quad : I'm instantiating wall prefab sprites over quad when user click to somewhere. But I don't want to ...
2
votes
0answers
29 views

Field of vision - Objective-c

Here's where I'm at. Here's where I want to be Here's how it's drawn SKShapeNode *fov = [SKShapeNode node]; UIBezierPath *fovPath = [[UIBezierPath alloc] init]; [fovPath ...
1
vote
0answers
135 views

How is curved 2d ground is implemented in real games?

I'm developing a 2d platformer (inspired by N game) and I already successfully implemented circle-convex, convex-convex and circle-circle collision. But now I want to be able to make platform that ...
1
vote
2answers
128 views

XNA 4.0 - Bounding Boxes

So i'm kind of new to programming and im trying to check collision using bounding boxes. i'm currently stuck as to how to call my bounding box within my bounding box function as shown below public ...
0
votes
1answer
65 views

TileMap or Voxel collision detection

I have a conceptual question: In the case of Tile Map, each block has the information from the enemies who are going about it. But what if some of these enemies are far greater than the block? I have ...
-1
votes
2answers
46 views

Before I change position I want to check if the gameobjects are collinding

For starters I'm new to Unity3d. So my question is when I click on an object I want to change its position but without collinding with the other objects and I need a function to check that. I already ...
0
votes
0answers
135 views

Unity - How to detect collision on child object collider

How can we make to the event "OnTriggerEnter2D" collisions on the objects children of the object with the c# event script? Look this: Is there any way to assign the event using "Delegates"? ...
0
votes
0answers
211 views

Java 3D collision detection with JBullet

So I have spent a long time trying to work on a collision detection system from scratch for own game engine and came up fruitless due to lack of time. Finally I decided to try to use Jbullet to try to ...
0
votes
0answers
43 views

Rotate Object inside room according to wall

I have a room. I am trying to move an object whenever it collides with a wall. It's working properly except at the edge of two meeting walls. At the edge it's flicking. I tried to move the object when ...
1
vote
1answer
397 views

How can I calculate the bounding box of a 3D model?

I am making a game in OpenGL and Blender and trying to use JBullet as the collision manager. I am using BoxShapes for collisions, which requires a javax.vecmath.Vector3f representing half of the box ...
1
vote
2answers
524 views

BoxCollider not blocking other object(s)

I'm really newbie , watched about 20 videos about and tried to do something. But I still have problems with collisions. I'm working on 2D. I have a Sprite and a Cube (GameObject>3D Object>Cube). ...
1
vote
1answer
411 views

Is it possible in Unity to Flip a 2D Sprite Without Flipping the Object it is Assigned to?

I 'built' (followed a tutorial) on a collision detection system, and when I flip the object to go left and right the collision messes up. So I have three options; find a way to modify the collision ...
9
votes
2answers
281 views

How do I prevent raycast car wheels sliding sideways?

I've been writing a non-realistic car physics engine as a learning exercise, using this article as a reference. I have a car that correctly collides with a terrain and applies the correct suspension ...
4
votes
1answer
120 views

Predictive Collision Detection - Find Time Of Impact

I have a green box at a starting position A. It can move along two paths A to B is linear motion A to C is under the influence of gravity (non-linear) The thin vertical line is a fixed ...
4
votes
2answers
94 views

Where to put the screen dimensions to make it accessible for all on screen objects?

I'm starting game development to learn a new language (SDL2, C++) and would like some opinions on the best way to handle a probably very basic problem. I don't want my player to go off screen, so I ...
1
vote
0answers
82 views

XNA4\ Monogame 3d Collision detection Help please

i have been trying to get 3d collision working for a while and i think(hope) you people can help me so for my project i have created a 'sprite3d' kinda class which is called ModelEntity and there ...
2
votes
1answer
153 views

Smooth Wall Collision Detection

I've been working on a small game, and I've been stuck on the collision part. During the collision, when my player hits a block, he stops just as it should, but it then doesn't allow me to another ...
0
votes
0answers
30 views

Platformer Tile Map Collision Help

I've been working on a small platformer as a simple project but, I'm having troubles with my collision detection. What I want is that as the player falls due to gravity, it will stop when it touches ...
1
vote
2answers
441 views

(Unity) Drag and detect object below when dropping

I'm studying game development in Unity and I want to create a idle/clicker game like Cow Evolution. I'm using OnMouseDown, OnMouseDrag and OnMouseUp to move the GameObject around the scene. Now I ...
1
vote
2answers
73 views

On key press, spawn a collider where my player is facing?

I'm trying to create an attack mechanic to my player hero in my 2D Tower Defense game. When I press the Q button I want my hero to do an animation and spawn a temporary collider shaped as a cone at ...
1
vote
1answer
108 views

How to implement angled surface?

I'am trying to implement 2D platformer game inspired by N game. But the problem is I have no idea how to implement something like this: I have two ideas of how this could be implemented but i ...
0
votes
0answers
25 views

objects bouncing off of each other as collision response

At the moment, how I solve collision between 2 objects looks like this: (all the data of the objects is stored in float arrays, since its OpenCL) float impulseX = mass[id] * vel[id3 + 0]; float ...
0
votes
1answer
74 views

MonoGame - Left/Right Sided Collision Not Working

I'm working on a platformer as part of my course, the problem I have come across is Left/Right sided collision is not working very well. I already have bottom & top collision working. Here is an ...
4
votes
2answers
388 views

Best way to handle cornering in a 2D maze game?

I want to implement smooth cornering in a grid, much like Pacman moving in his maze. A big difference with Pacman, my characters can stop- thus the player has to keep pressing the controls to keep ...
0
votes
0answers
28 views

AABB in OpenCL not working correctly

I have this really simple OpenCL kernel. The values get in correctly and get out correctly. So the error must be somewhere in the kernel. All the parameters are float arrays. pos rot vel and aPos aRot ...
0
votes
1answer
61 views

XNA Line to Rectangle Collision return first pixel

I have the following code: public static bool LineIntersectsRect(Point p1, Point p2, Rectangle r) { return LineIntersectsLine(p1, p2, new Point(r.X, r.Y), new Point(r.X + r.Width, ...
1
vote
3answers
253 views

Collision Detection/Response Issues in Unity

Sprite A: Box Collider 2D and Rigidbody 2D. Sprite B: Box Collider 2D. Both sprites have a Sprites/Default material with Pixel Snap enabled. The textures being used are set to Truecolor Format and ...
4
votes
1answer
201 views

Calculation correct position of object after collision (2d)

I have a circle, that bounces of walls. The circle is traveling at the speed defined by px/s for x and y. I have collision detection implemented and I use vectors to calculate the new x/y speed (and ...
0
votes
1answer
119 views

Where should I save game object's attributes (hp, score) in Swift?

Scenario: I have a game with several game objects on screen. Each can have different score and hitpoints. When I use collision detection for cannonball vs. ship (example) I need to know which ship is ...
1
vote
1answer
65 views

QuadTree Checking Collision With Different Levels of Nodes

I am making a QuadTree for a 2D Platformer. Researched on it and I managed to make a pretty good one where each node stores its 4 SubNode and there's a MAX_OBJECTS for each Node and MAX_LEVELS which ...
1
vote
2answers
123 views

How to know from which direction there is a collision with an object? In Unity C#

In the game, there is a ball, and moving objects that can hit it. I want the ball to move when an object hits it. But the ball should move to the right direction, the one which the collision was from. ...
0
votes
1answer
52 views

How to use objects with different attribute values in Swift?

I think this is a really basic question and to make it easier to understand what I do not understand, I use the following scenario. Scenario: I have two or more ships in my game. They should have ...
2
votes
2answers
330 views

What are the disadvantages of R-Trees in collision detection?

I was poking around in SQLite and discovered R-trees. A little digging revealed that R-trees are really just fancy AABB-trees. Then I realize that the state of the art in collision detection (often ...
0
votes
1answer
1k views

Unity5x GetComponent<Animation>().Play(“sequence”.StopAll) not working

I'm working with Unity3D 5x using C#. I've attached collision detection to the character controller script that plays a "gothit" animation clip (using legacy animations). Here are the code snippets, ...
3
votes
2answers
331 views

2D Collision Detection XNA C#

I've read all around the net, watched videos, tried things and in the end I can't make a decent platform collision detection. I've followed this tutorial. It didn't work out at 100%. My object stops ...
1
vote
2answers
160 views

Simple way to detect collision between two bitmaps on android surface view

I'm looking for a standard way to detect collision between two bitmaps inside a surface view. I tried the intersect method with two rectangles, but it doesn't log. practiseA = new Rect(500, 500, ...
1
vote
2answers
253 views

Character controller passes through mesh collider

I need a little help figuring out what's going on with an NPC's character controller. Here are the character controller settings for the NPC. The problem I'm running into is that the NPC isn't ...
0
votes
4answers
195 views

Implementation of collision in 2D platformer (C++)

My collision system for my game currently works fine, it lets me test a collision with an entity or specified rectangle... but that's not enough. I used to use GameMaker and it had collision events in ...
0
votes
0answers
76 views

How Can I Make These Collisions Work Outside Of Unity's Built-In? (C#)

I'm having some trouble working out what's wrong with my code. Basically I want to have my player be able to collide with obstacles it's flying through. So I have an obstacle, and a pathway or two ...
0
votes
1answer
57 views

How to detect a collision between a isosceles trapezoid and a circle

I figured one approach would be to divide the trapezoid in three parts, two triangles and a rectangle in the middle. Then for the circle-rectangle case I would check collision like this: function ...
1
vote
2answers
146 views

How can i handle collision response in a voxel game?

I'm making a voxel game with cubes - like in minecraft - and I have figured out how to check wether the player is colliding with a voxel, I have just done it by checking wether the player is within a ...
2
votes
1answer
146 views

How does matrix based game physics (collision detection & response) work?

I'm familiar with how to do collision detection and response using shape intersection tests, the separating axis theorem, and by using MPR and GJK with minkowski sums and support vector defined ...
2
votes
4answers
170 views

Check if body is on the ground

In my game I have an quite irregular terrain at the bottom and a round ball which can be controlled by the keyboard. Is there any way to check, if the ball is currently on the terrain? This is very ...
0
votes
0answers
80 views

Why are my smooth curved meshes bumpy?

Reference .gif of what I'm experiencing I've been trying to create smooth surfaces for my game in Blender, mostly curved ramps. However, for some reason I can't get the ball to roll smoothly along ...
0
votes
1answer
211 views

Is it possible to detect contact with every frame change when using an animation in SpriteKit?

Is it possible to detect contact with every frame change when using an animation in SpriteKit? For example, if I have two nodes of a person walking, I want to detect contact with the ground each time ...