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

FInd out if AABB is left/right/below or obove a ray

What algorithms are there to find out in which quadrant of the ray an AABB is? My idea was to rotate the cube by the negative rotation of the ray and move it by the negative position and then find out ...
0
votes
0answers
17 views

How to detect if an object has been effected by AddExplosionForce?

I have a bunch of animated AI characters and I want to disable the animator and NavMeshAgent when a bomb has gone off. For each bomb I have used AddExplosionForce to create an explosion. How can I ...
1
vote
1answer
53 views

Collision detection C++

I'm currently trying to make a small ball-like game in C++. I have two disc-like objects with varying radii. Let's say Disc 1 is on coordinates (100,0) and Disc 2 is on coordinates (400,0). Now Disc 1 ...
0
votes
0answers
7 views

How to display vertices/faces with collision handler for a tetracube colliding with cylinder in python3D?

I am research scholar working for cube collision with cylinder and its different shape variations.
0
votes
0answers
21 views

How to prevent corner slipping with a shortest axis collision solver

Currently I use AABB's to represent objects in my game engine, I resolve collisions between them by finding the shallowest axis, but this leads to a problem if an object is approaching another in a ...
0
votes
1answer
73 views

Möller-Trumbore false positive

I've implemented the Möller-Trumbore algorithm but I hit some false positive: Ray: vec3(2.100000, -1.000000, 3.314214), vec3(0.685786, -1.000000, 1.900000) Collide with: vec3(1.000000, 1.000000, -0....
1
vote
2answers
55 views

Detecting collisions between orbiting objects in 2D

I am currently in the process of creating a 2D space debris simulation. I have the orbital physics implemented, but I am currently struggling to find a suitable way of detecting collisions. There are ...
1
vote
1answer
37 views

C# XNA colliders, physics, inclined plane/terrain/colliders

Currently I'm working on a project to learn game programming. But I'm not sure if I have the right approach on several things, and that's what I'm here for. What I'm trying to create is a small world ...
0
votes
1answer
57 views

Snake game - Snake Collision

So I am making a snake game as final assignment for semester 1 of my game dev study. We have to write it in C# in Visual Studio 2015. I am using the .NET 3.5 framework. So basically how my snake ...
3
votes
0answers
56 views

Hit detection for partially covered object?

Say you have a character standing behind cover such that some of its body parts like a shoe or a palm is still outside the cover. An explosion takes place close to the cover . In real life this ...
-1
votes
2answers
40 views

JavaScript Collision Detection bug

Hello to all who are reading this post In trying to make Mario type of game but I have some collision bug maybe someone can explain to me whats is incorrect and how to fix it Collision part there ...
0
votes
0answers
26 views

Android: Collision with Swept AABB algorithm, how to compute velocity correctly (in onTouchEvent)?)

I have difficulties implementing the AABB swept collision algorithm for collision dectection in android. Let me explain my problem in detail and post some of my code at the end of the post. I have ...
1
vote
1answer
35 views

How can I move my box collider temporarily?

I'm very new to game development, I mostly program other things. I'm trying to write a basic whack-a-mole type of game. I've gone ahead and created a hammer with a swinging animatio in the FBX. I've ...
0
votes
1answer
22 views

Raycast implementation in order to optimizate collision-detection

I want to know if a gameobject (a plane) is facing another one to prevent collisions. Right now I have an array that contains all planes in the scene and, for each one, compare position in order to ...
0
votes
1answer
35 views

Android: How to prevent player(drag/drop touch input) from moving through non-moving objects?

My player is moved around the screen by touch user input. The user touches the character and drags him to another position. (implemented in touchevent: actionmove and actiondown). I want the touch-...
0
votes
0answers
17 views

Unity Physics2D.BoxCast distance parameter doesn't work

I'm currently using Unity version 5.4.2f2 Personal for Mac and I'm having trouble getting Physics2D.BoxCast to work. I've setup a simple example Scene with the default camera, a single empty ...
0
votes
1answer
33 views

Bounding box collision handling makes player glitch to the other side of the wall

The way I handle simple collision detection causes a really frequent and easy to reproduce glitch, which affects gameplay severely. Here's my code (Python 3.5): def move(self, _map): self.col = ...
0
votes
0answers
68 views

Pixel-correct collision affected by scaling?

So I've come to the point where I need to implement a proper and accurate pixel-correct collision, as using any other form of collision methods such as rectangles, circles and etc, are very unreliable ...
4
votes
2answers
547 views

Why does my capsule collider fall without my object (Unity)?

I've got a player with a rigidbody/capsule collier (gravity enabled) and a plane with a box collider. When the player is on the plane, everything works as expected, the player can walk across the ...
0
votes
0answers
17 views

How to design Client-server hybrid hit detection with projectile weapons?

Hybrid hit detection here refers to a architecture where client sends a hit claim to server and server verifies it with a tolerable error limit to confirm the hit or deny it. This technique may work ...
0
votes
2answers
43 views

How to Handle my Collisions in java

I'm currently making a color switch game All my obstacles are made out of 4 shapes of a different color. The shapes are in an array with their index being the same index as it's color in a array of ...
1
vote
2answers
43 views

Keeping a Character Controller grounded?

I've got a character that makes use of isGrounded() to determine whether I can jump, whether my air-jump is reset, and the amount of friction to be applied. I've run into a common problem, isGrounded()...
0
votes
1answer
24 views

Color Switch Collision Detection

If you don't know what color switch is look here: http://poki.com/en/g/color-switch I need a good way to detect the color collisions, one way would be to get the colors of pixels around the ball on ...
0
votes
0answers
22 views

Fitting tiles into square

I'm trying to make a game, where you have a 30x30 sized room, and there are 2x2 and 2x1 sized tiles. At first, randomly generated amount of tiles placed randomly into the room. The task is to decide ...
0
votes
1answer
118 views

Verify if a circle is completely inside a rectangle or not?

I am a beginner in game development. I am using the libGDX library. My question is two-fold. 1) First I'd like to know the best algorithm to verify if a circle is completely inside a rectangle. I ...
1
vote
1answer
27 views

MissingComponentException: There is no 'TextMesh' attached to the “Can” game object, but a script is trying to access it

When I run my program I keep getting: MissingComponentException: There is no 'TextMesh' attached to the "Can" game object, but a script is trying to access it.Even though I have attached it as you can ...
0
votes
0answers
27 views

Python Pygame Collision with a Rotating character

Trying to make my character not be able to pass walls, I'm finding it difficult as my character rotates to face where ever my mouse is while moving with WASD to do this I have used self.pos to keep ...
0
votes
3answers
49 views

How to make space invaders destructible scenery and conform it to a shape?

We all like the bases that can be destroyed by chunks being split out, I originally implemented it by making a rectangle filled with individual squares (2x2 pixel size CANVAS rects) that would ...
0
votes
0answers
13 views

Scale CircleCollider2D radius independently, regardless of gameobject scale without the use of another gameobject

Resizing an object with a CircleCollider2D attached to it on either x or y axis changes the radius of the collider. Is there a way, without attaching the circlecollider to a new object, to have the ...
0
votes
0answers
52 views

Jumping through slopes [closed]

I'm trying to make my 2D game engine in C++ using SDL2. I was able to do slopes using the "Tile Based (Smooth)" type described here. They work fine except for one thing: if you jump on it, you'll go ...
0
votes
1answer
95 views

2D collision not working

I'm new to game programming and my first project is a platformer. All things are going well, I draw the map, got the scrolling working, there's only one problem. I can't get the collision to work, I ...
0
votes
0answers
33 views

Swept AABB resolution problems

I implemented a basic swept collision resolution algorithm for 3D AABBs, code below. bool Physics3D::CheckCollision(Body& b1, Body& b2, glm::vec3& normal, float& time, float dT) { //...
0
votes
2answers
61 views

Correct velocity on collision between two rects

I have two moving objects. The objects consist of a velocity vector2, a rectangle and a vector2 as position (origin in the middle of the rect). Some rough pseudo code for my collision checking ...
0
votes
2answers
72 views

Monogames Most efficient way of checking intersections between multiple objects

I've created a top-down shooter with multiple objects such as enemy AI (tanks), walls, power-ups etc. At first I was able to create about 300 AI units which aims to move the player character, checks ...
1
vote
0answers
63 views

2D array top down map collision problem

I am working on a grid based game in c++. I am using this project to learn c++ syntax and get stronger with some programming concepts in general so fairly beginner level programmer here. The problem I ...
1
vote
0answers
37 views

How to handle collision detection & response in voxel engine with slopes?

Voxels are fairly small An object can span an area of 8x8x8 or more Vertices of Voxel Type are always snapped to the grid: Voxel types are convex (except the second type - which can be thought of as ...
0
votes
0answers
35 views

Do I actually need the MTV in the Separating Axis Theorem?

To preface this question, I understand that the MTV provides the minimum amount needed to translate object1 with object2, but in the context of a game, I don't understand why or even if I need it, as ...
0
votes
2answers
83 views

Finding the Distance between 2 Objects

I have 2 objects One Having a Transformation Matrix T1 and other Having Transformation Matrix T2. And We are having a View Matrix V and Projection Matrix P. Basically 2 Object are render using this ...
1
vote
0answers
30 views

What algorithm to use for predictive collision detection in multivariate systems?

In the collision system for my game I basically have two kinds of things, boxes, defined thusly: struct Box2I { uint32_t x, y, width, height; }; and quads, which are used for terrain: struct ...
1
vote
0answers
44 views

How do I make 2d collisions based on color?

I'm a Unity noob; digital artist, first and foremost. I just want to know how I can make a simple collider for my 2d car, based on the 2 colors of this 2d map. I want it so the car doesn't touch the ...
0
votes
1answer
31 views

XNA player/tile collision not working perfectly

So I've built a map tile engine in XNA, and have been working on the player/tile collision. The method I'm using works well to some extent, but the player will often move through the walls and get ...
1
vote
0answers
33 views

Finding the Dimension of OBJ objects

I am having a Three OBJ file , Cone , Sphere and Cube. How can i find the dimension of these objects , so that i can use it in my collision detection class. i.e How can i find Radius , Length of Cube ...
0
votes
1answer
50 views

What would be a fast way of detecting collision between 2 2d rotated rectangles?

Currently I am following this tutorial here for 2D collision detection: http://www.gamedev.net/page/resources/_/technical/game-programming/2d-rotated-rectangle-collision-r2604 I have found that the ...
0
votes
1answer
92 views

How do I detect if two 3D box shapes are overlapping each other?

I'm creating a Unity game, and for my building system inside the game, I need to detect if 2 3d box shapes are overlapping each other. What I'm doing this for is, lets say I'm building a wall, I need ...
0
votes
1answer
22 views

Line rect intersection - lines behave like rays

Why is this? I have a simple ship that is a 14x14 rectangle, and a contour map. I want to be able to determine when the ship hits the ground. Here's a link to the JSFiddle. Here's what happens now: ...
0
votes
1answer
27 views

Line rect intersection

I've been reading Timothy Wright's "Fundamental 2D Game Programming With Java". I'm trying to apply its principles to a Lunar Lander game - it's a JSFiddle for now, and can be found here. The problem ...
0
votes
0answers
19 views

2d continuous convex poly vs circle detection

2d "true" continuous, not swept bodies Moving under pure translational motion with constant velocity (well, forward-Euler integrated) Have working "true" continuous poly v poly, poly v plane, circle ...
0
votes
2answers
106 views

Adding collisions to a 3D mmorpg game

I'm creating a mmorpg game with a little team, and we want to add a player-objets collisions system. We want players to be able to walk on a heightmap ground, and walk/be blocked by objects. I found ...
0
votes
0answers
56 views

Pseudocode for a basic pool like game

I'm trying to write a basic but accurate simulation of balls colliding with each other and a square enclosing, and I'm wondering if you can help me with pseudocode to give me an idea of the overall ...
1
vote
3answers
581 views

Better Way to Detect Line Cross

I am developing a very simple game in libGDX for android devices. Simply, the game is a character who runs and jumps over obstacles, every time the character jumps over one of said obstacles, a ...