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
votes
1answer
24 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
19 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 ...
0
votes
0answers
18 views

[Collision detection][Server side]Best way to implement collision algorithm?

I'm part of mmo server programming team for an already finished client. I need to implement creature to creature collision detection [server-side] My props: So each connected client has a list of ...
1
vote
1answer
29 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
20 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
29 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
16 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
32 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
50 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
536 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
14 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
41 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
30 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
23 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
21 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
91 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
18 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
26 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
0answers
38 views

Collision detection problem in Java

I have a problem in my game. My player cannot move after I put collision detection from this video: https://www.youtube.com/watch?v=DadImcUt9Nk&index=22&list=PLah6faXAgguMnTBs3JnEJY0shAc18XYQZ ...
0
votes
3answers
45 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
11 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
50 views

Jumping through slopes

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
78 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
60 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
64 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
59 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
31 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
33 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
77 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
29 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
42 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
29 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
79 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
20 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
26 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
103 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
54 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
576 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 ...
1
vote
1answer
51 views

Points inside a Polygon, failing for shapes with 0,0

I've been using an algorithm (http://wiki.unity3d.com/index.php/PolyContainsPoint) to tell me if a point is inside a polygon... in fact a few variants (here and here) but they all come back the same. ...
1
vote
1answer
51 views

Garry's Mod gamemode scripting (lua) - How do I tell if an object is inside a hollow cylinder?

I'm fiddling about with gMod trying to make a gamemode where you have to throw a piece of cake into a cylinder that spawns on the map. This is the code I'm using to spawn the cylinder: local ent = ...
0
votes
0answers
24 views

How to detect diamond shape collision detection , if object is inside the diamond

i have block with diamond on top , it is moving along the Y coordinate. i have object which i want to know if it is inside this diamond shape. it is now isometric game . i saw this , but i have ...
0
votes
0answers
18 views

Cocos2D - Detect how many items an object collided with / negating more than one object

In creating a small breakout clone, I've managed to get the ball to bounce whenever it hits a block by negating (or multiplying by -1) either the X or the Y values. This works, at least until the ...
5
votes
1answer
183 views

Reconciling Flocking and A* (Theory)

For my RTS game I have got A* pathfinding working, and that's fine. Basic collision detection exists too. When a unit is moving it checks if the position it will occupy next move is a node occupied ...
1
vote
1answer
33 views

Box collider pushes me out of it's area slowly, I can pass through it if moving quickly

I am new to Unity. I Setup a character in unity2D with a rigidbody. I had the scale off my sprites set to 100 pixels per unit. At this scale, my rigidbody character stood on top of platforms and could ...
0
votes
2answers
63 views

Collision handling for grid based games and simulations

I'm trying to implement a grid based game where there are many creatures moving in the grid from square to square. I'm having a hard time handling collision with creatures in the grid (multiple ...
1
vote
1answer
49 views

why is my OnCollisionStay is not calling?

I am very new to unity, i have used onCollitionStay() method but its not doing anything, i wanted to do in my code is "if zombie stays for 20 seconds with player the player life should be reduced", ...