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
2answers
195 views

How can i get almost pixel perfect collision detection in a multiplayer game?

I'm currently working on a multiplayer game for iPhone. The problem i have, as with all multiplayer games, is that the other user will always see everything at a non-constant delay. The game I'm ...
0
votes
2answers
130 views

Without using a pre-built physics engine, how can I implement 3-D collision detection from scratch? [closed]

I want to tackle some basic 3-D collision detection and was wondering how engines handle this and give you a pretty interface and make it so easy ... I want to do it all myself, however. 2-D ...
3
votes
2answers
227 views

How should I choose quadtree depth?

I'm using a quadtree to prune collision detection pairs in a 2d world. How should I choose to what depth said quadtree is calculated? The world is made mostly of moving objects1, so the cost of ...
0
votes
0answers
29 views

Turning on collision crashes game

I am getting a null pointer excecption to both my sprite and level. I am working on my mob class, and when I try to move him and the move function is called, the game crashes after checking collision ...
2
votes
2answers
93 views

Is an extra collision-mesh for level-data worth the hassle?

What is the optimal approach for collision-detection with the environment in an 3D engine (with triangle mesh based geometry, no bsp)? A) Use the render mesh [+] no need for additional work for ...
2
votes
1answer
244 views

libgdx collision detection / bounding the object

i am trying to get collision detection so i am drawing a red rectangle to see if it is working, and when i do the code below in the update method. to check if it is going to work. the position is not ...
-1
votes
1answer
120 views

Adding a small slide when player releases left/right key

The aim is for the player object to slow down and stop instead of just stopping dead. The following codes works ok when the player is not jumping, but gets stuck in an object if the player is in the ...
1
vote
1answer
79 views

Point in Polygon, Ray Method: ending infinite line

Having a bit of trouble with point in polygon collision detection using the ray method i.e. http://en.wikipedia.org/wiki/Point_in_polygon My problem is I need to give an end to the infinite line ...
0
votes
2answers
155 views

2D Tile Collision free movement

I'm coding a 3D game for a project using OpenGL and I'm trying to do tile collision on a surface. The surface plane is split into a grid of 64x64 pixels and I can simply check if the (x,y) tile is ...
0
votes
3answers
370 views

How to optimize collision detection

I am developing a 2D Java Game with LibGDX. This is what it kinda looks like (simplified): The big black circle is the player, which you can move by tilting the smartphone. The red circles and blue ...
0
votes
1answer
57 views

From where does the game engines add location of an object?

I have started making my first game( a pong game )with ruby (Gosu). I'm trying to detect the collision of two images using their location by comparing the location of the object (a ball) to another ...
3
votes
3answers
1k views

Detect collision from a particular side

I'm making a platform sidescrolling game. All I want to do is to detect if my character is on the floor: function OnCollisionStay (col : Collision){ if(col.gameObject.tag == "Floor"){ ...
1
vote
0answers
43 views

Bullet Physics ConvexDecomposition?

I've looked at Bullet Physics ConvexComposition Demo and would like to implement that in my game but the code is so undescriptive and it's hard to understand what is going on. Would any of you people ...
0
votes
1answer
130 views

Using Bullet physics engine to find the moment of object contact before penetration

I would like to use Bullet Physics engine to simulate the objects in 3D world. One of the objects in the world will move using the position from 3D mouse control. I will call it "Mouse Object" and ...
0
votes
1answer
103 views

Load Meshes with Bullet Physics

I just started implementing some physics in my game with Bullet Physics and I was just wondering how would i use bullet physics to load in meshes. For my for DirectX I load in x files into a ...
0
votes
2answers
675 views

Libgdx detect when player is outside of screen

Im trying to learn libGDX (coming from XNA/MonoDevelop), and I'm making a super simple test game to get to know it better. I was wondering how to detect if the player sprite is outside of the screen ...
2
votes
2answers
182 views

Sprite Kit - containsPoint for SKPhysicsBody?

I have a ball bouncing around the screen. I can pick it up and drag it onto a "bucket". When my touches finish, I use the containsPoint function to check and see if I have dropped the ball onto the ...
-1
votes
1answer
166 views

simple collision detection with box2dweb

im beginner in box2dweb that version of box2d for javascript i wrote simple gravity system and i want to detect the collision between the box and the ground , when the falling box hit the ground ...
0
votes
1answer
79 views

Bounding Box Collision Glitching Problem (Pygame)

So far the "Bounding Box" method is the only one that I know. It's efficient enough to deal with simple games. Nevertheless, the game I'm developing is not that simple anymore and for that reason, ...
1
vote
2answers
137 views

How to solve the overlap between a rectangle and a circle that collide

I have two figures - a circle and a rectangle and i have a method that checks whether the two figures collide. How to prevent them from overlapping during collision?
1
vote
0answers
119 views

Collision detection 3d rectangles using SAT

This question builds on a previous post asked by griffinHeart nov 2012. See link below. How many and which axes to use for 3D OBB collision with SAT Refering to the explanation/answer by Ken. What ...
10
votes
2answers
373 views

Extrapolation breaks collision detection

Before applying extrapolation to my sprite's movement, my collision worked perfectly. However, after applying extrapolation to my sprite's movement (to smooth things out), the collision no longer ...
1
vote
0answers
31 views

Any tips on developing an RTS unit movement collision? [duplicate]

so I am developing an RTS and I am a little stuck at this. I am not talking about pathfinding algorithms like A*. The problem is moving units in bulk and their collision along the way. Can anyone give ...
1
vote
3answers
80 views

How do I find the intersection of a ray and a cylinder?

I'm looking for the algorithm to find the intersection (or lack of) between a ray and a cylinder. I have rotating coin like objects in my game world and need to check for a collision on that object. I ...
1
vote
2answers
287 views

Object goes straight through game object without colliding

The "shot" is supposed to collide with the left bumper and then be destroyed, but the shot goes right through it. Both objects have a box collider. The following is the code I am using: #pragma ...
0
votes
1answer
121 views

Collision intermittently fails when multiple bullets on screen

I'm building a very simple Java game where a player rectangle fires bullet rectangles at enemy rectangles. When a single bullet is on screen, it always correctly collides with enemies. When multiple ...
0
votes
1answer
89 views

Can't get the logic behind my AABB collision

This is my collision detection function in the maze game im working at. I never made a game before and I dont have that much programming experience. The question I keep asking me continously is why ...
0
votes
2answers
182 views

Smooth moving on tile-based map, how to fix simple collisions?

I've already had some experiences about the work of 2 dimensional square-based playfields and moving a player on them. Though, when a square has multiple pixel sizes, and player moves e.g. 1 pixel per ...
0
votes
2answers
325 views

Wall jumping collision detection anomaly

I'm creating a game where the player ascends a tower by wall jumping his way to the top. When the player has collided with the right wall they can only jump left and vice versa. Here is my current ...
1
vote
2answers
136 views

Unity - Across the wall

I have a problem here. I animated my main character and is working. It walks run and jump however it goes across walls and ground. As in every single video I watch in unity tutorials I put a ...
0
votes
1answer
209 views

How to solve the overlap of two circles that collide

I have two circles , one of the circles is static the other is moving around. I have a method that checks whether the two circles collide. How to make the two circles don't overlap when colliding? ...
1
vote
1answer
189 views

Different OnMouseDown functions based on where an object is clicked

So my problem is I'd like to have one GameObject with multiple "OnMouseDown" functions. I have a target (classic looking bullseye) and I'd like to award a player say 10 points if they click on it, but ...
3
votes
1answer
130 views

Collision detection in Pong clone

Well I'm trying to create a pong clone using SDL and I had some problems with the frames and some times the ball would go through the paddles despite the fact that at other times the collision worked ...
3
votes
2answers
288 views

How can I improve my collision detection's performance?

I'm new to programming and want to speed up the collision detection in my C++ 2D platformer game engine. Currently, only the player's collision detection works: Every frame, the player's update ...
9
votes
4answers
742 views

Make the player run onto stairs smoothly

I have a 2D Platform game, where the player Always runs to the right, but the terrain isn't Always horizontal. Example: I implemented a bounding-box collision system that just checks for ...
0
votes
0answers
77 views

Collision at incorrect height between boxes and btHeightfieldTerrainShape

I'm using btHeightfieldTerrainShape from BulletPhysics for collision between fired boxes and a terrain. But such boxes seem to collides at higher positions above the terrain as the following picture. ...
-2
votes
1answer
109 views

in a 2D game that has an array as a map how to make graphics look nice?

I have a map that's stored in a 2D Array with 1s being walls, 0s being roads, and 2s being houses. There is a character that is not stored in the map but its position is always checked against the map ...
1
vote
1answer
67 views

Calculate diameter of sphere large enough to encompasss a frustum

I'm attempting to speed up box-to-box collision checks by first testing if two spheres large enough to encompass each (respectively) would collide (because I'm using separating axis theorem and it's ...
0
votes
1answer
119 views

Collision detection using distance field for a dynamic object

I am using a signed distance field for collision detection. The object I calculated the distance field for rotates between 0 and -30 degrees. The other object I want to check collision against is in a ...
0
votes
0answers
63 views

Trying to get an object to move back and forth on collision between two collidable objects

Im trying to get a box object to hit a collidable wall on the right and when it hits it move left and hit the left wall and switch back and so on and so forth. Im having trouble with this because ...
0
votes
2answers
161 views

Integration error in high velocity

I've implemented a simple simulation of two planets (simple 2D disks really) in which the only force is gravity and there is also collision detection/response (collisions are completely elastic). I ...
0
votes
1answer
52 views

Revert to closest non intersecting position

First, let me start by saying: Please forgive me if this question have already been asked. I've tried to search but didn't find any solution. (It might be due to my lack of terms). I have two ...
1
vote
1answer
123 views

Can I use a list sorted by Morton Code for broad phase collision detection?

Until now I used a list of objects sorted by a single axis for limiting the amount of objects that collisions are checked against. The idea is simple: if the x coordinate of two objects differs by ...
1
vote
1answer
1k views

Libgdx collision detection and response

I am trying to create a simple platformer game with libgdx. I implemented a collision detection for the player's bounding box with the map's tiles using the Rectangle.overlaps method. In response I ...
0
votes
1answer
136 views

Having issues with pong physics, is my approach wrong?

I've been working on a pong clone, i've made games in the past but they have all been very hacky. This time I was trying to go for a better approach in terms of using OOP or patterns. So far the games ...
1
vote
0answers
56 views

Setting up 3d Collision for Primitive shapes

Im having some trouble understanding how to set up collision detection between my first person camera and my primitive shapes which are made using the vertex buffer. Do i give my camera a boundingBox ...
1
vote
0answers
69 views

java slick2d - gettileproperty returns true when it shouldn't [on hold]

I'm trying to implement some collision detection to a test game i've been making. I've used TiledMap to create the map and set a property on one of the tiles to blocked=true This tile is then drawn on ...
0
votes
1answer
66 views

JBox2D bodies don't collide?

I have two objects. A dynamic player and a static ground object. It was working for a while until I did some refactoring and suddenly my play falls right through my ground object. Is there anything ...
1
vote
1answer
77 views

Preventing rapid inversions of boolean on Collision detection

I know this is both a strange question and a stupid question. But this is an issue I have dealt with in every single game I've made, and I have yet but to find a solution. I can't be the only one ...
2
votes
1answer
40 views

Saving resource

I'm trying to develope a simple platformer on Java, I was wondering if is it better to handle the collissions in a level (player with floor, player with enemy ecc...) by a level handler class which ...