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

How to prevent the player from calling the Jump function if no collision is detected?

I am back once again. This time with a basic 2D platformer game. I would like to allow my player to jump but only if the ground bool checks as true. I would like to fix my script so that upon ...
2
votes
1answer
48 views

Creating a Collision Detection system

I'm currently working on 3D project (C++) and I have now come to writing the collision detection systems. Basically my question is regarding how to architect it. All the collisions are either ...
0
votes
0answers
33 views

My sprites do not always respect collisions in Pygame

I have a Player sprite (40x40 pixels) and Tiles (20x20 pixels) which build the terrain. At the 4 edges there are 2 rows or columns (depends on vertical or horizontal) of wall tiles. Those are the ...
0
votes
0answers
26 views

Python 3.4.3 + PyGame Hit Detection w/Rectangle & Circle [on hold]

Collision VIA. Rectangle & Circle Alright, so I'm trying to take the ship and make collision to the meteor using circle to rectangle collision. I'm new to Python and overall programming so I ...
0
votes
0answers
23 views

Proper Angled-Top Down Wall Collision?

Sorry about the vague title, it's kind of hard to say what I want to do in a few words. In my top-down game, I'm having a problem implementing proper collision for walls facing north (that is, you ...
0
votes
0answers
30 views

Detect which direction an object collides with another

so I am trying to implement a collision detection system. I'm only using rectangles, so it's not too complicated. My collision detection currently does detect if the 'player' object intersects the ...
4
votes
1answer
72 views

Torus World Collision Dection

I am looking for a collision detection solution for use when 2d screen wrapping. Specifically, when the image is split between the right and left side I can only detect a collision for a limited ...
0
votes
0answers
26 views

Advantages of “Overlap testing” and “Intersection testing”

I have been looking for advantages and disadvantages of both techniques, but I was only able to find a few disadvantages such as: Overlap testing may fail for objects moving very fast and Intersection ...
1
vote
3answers
106 views

3d collision for non mathematician

I am having an extremely hard time understanding smooth 3d collision, i have spent month trying to figure out the math and still cannot get perfect collision like in games such as Quake. I've ...
0
votes
1answer
43 views

Libgdx using Box2d with TiledMap to create collision detection

I'm fairly new to Libgdx and have some good basic knowledge on Java. Right now I am stuck on how to add collision to my TiledMap, I am using the Mapeditor to create the tilemap. I read so many ...
1
vote
1answer
83 views

How do I make circles bounce off each other realistically?

I'm trying to create bouncing balls with realistic physics. At the moment, when the balls hit each other, they bounce back in the same direction they came from. How do I make them more realistic? I ...
0
votes
1answer
51 views

LibGDX collision with rectangle and circle

I have 2 objects, A and B, both are classes with only values, so positions and dimensions are only values (float posX,posY). I have a render class which render A and B with shapeRenderer; A is ...
1
vote
1answer
54 views

Will Frame Independant Movement break collision

Using my game loop to give my game movement which is independant from the framerate, has been working fine for me but, I've started to consider my games running on machines which cannot keep up with ...
0
votes
1answer
41 views

Java 2D Game Hitbox Detection & Rounded Corners

I am working on a simple 2D game with Java, swing and no framework. I have a rectangular player that the user can move around. On the map are few obstacles which the player should not be able to go ...
0
votes
0answers
17 views

JBullet - Object is colliding at the wrong location!

I'm trying to make archers walk on my ship. I create the ship mesh like this: { Model mesh = null; try { mesh = OBJLoader.loadModel(new File("res/ship.obj")); } ...
0
votes
1answer
15 views

Nested ipairs for basic hit detection

So i'm developing my first game using Löve, the game is a basic asteroids clone. Everything is going well so far, until I decided to actually add asteroids. I'm trying to make a basic hit-detection ...
0
votes
0answers
46 views

Implementing a 2D Collision method that can tell direction of collision (boxes)

Been searching for quite a while now and really struggling to find an easy way, or a good tutorial on how to create a collision detection system which can indicate what side on a box a collision has ...
2
votes
2answers
86 views

Spatial Partitioning - Objects larger than cell?

I'm developing a top down 2D tile based game. Recently I started working on collision detection and have gone down the route of simply using spatial partitioning. Each object belongs in a cell and ...
1
vote
1answer
51 views

Bullet Physics - Collision not working when moving btBvhTriangleMeshShape

I have a robot (btTriangleMeshShape for each component) and a chain of boxes used as a cable, which is anchored on two components of the robot. I want to rotate a robot component and when this ...
4
votes
3answers
199 views

Sphere to plane collision never rearching resting contact

I have been trying to have a sphere to plane eventually lead to the sphere coming to a resting contact, but my sphere will end up always bouncing forever. It will bounce correctly for the first few ...
1
vote
1answer
42 views

Find distance from Vector2 to nearest point in Rectangle

I'm setting up collision detection and I have Walls which store their positions as rectangles. I need to figure out the distance from a Vector2 to the nearest side of a rectangle. If this was two ...
0
votes
1answer
81 views

Good collision resolving mechanism

In my game i have plenty of objects that can collide. Literally, most of them can collide with each other.The problem I'm facing is that i can't come up with some good collision resolving way. How can ...
0
votes
1answer
27 views

Resultant Vector Of Circle Line Collision

For my game I need to have a circle collide against a wall and bounce off in the appropriate direction. I've looked around for a while and haven't found a good solution to my problem. I have a diagram ...
0
votes
0answers
23 views

How to use collision masks and overlap_area in pygame?

So, I've been prototyping a game, and I've been using sprite collision, and it's not cutting it any more. I read up on the documentation about masks and overlap area: ...
0
votes
1answer
34 views

How to calculate collision detection from big rectangle to small rectangle

i have big rectangle that can move to each side , its boundaries can't enter to the small rectangle inside it , the anchor point is in the middle of both of them . lts say the big rec is 1000 * 1000 ...
1
vote
1answer
100 views

Rigidbody physics concept: Why translate collision shape on-the-fly instead of mutating it?

Crossposting at http://stackoverflow.com/questions/29993547/rigidbody-physics-concept-why-translate-collision-shape-on-the-fly-instead-of-m I've spent some time going through physics engine's ...
0
votes
3answers
232 views

Error in Finding Nearest Hexagonal Tile

Using Openfl for a game using hexagonal tiles Working out the problem of walkability in a game, and I've run into an issue with my Hexagonal tiles. I think it is an odd rounding error of sorts. When ...
0
votes
0answers
40 views

Should I handle mobile collision from the mob or projectile? [duplicate]

I have a fast tile collision setup and quadtrees for collision between mobile entities. I have been back and forth in my other games for if I handle projectile-mob collisions in player or mob ...
0
votes
0answers
35 views

How to calculate multiple collision of sphere and triangles?

I have a sphere and a mesh(triangles). When the sphere intersects the triangle, I reflects the vector of speed and everything works fine. But I can't write a good implementation for multiple ...
0
votes
0answers
14 views

Getting one-point-collision object to conform to uneven terrain while keeping constant distance covered

This is probably best described by image: I have a character. For floor collision, it uses a single point (the red X). When the character moves, it conforms to the terrain; note how the blue line ...
0
votes
1answer
70 views

Sprite Kit - keeping character level with the terrain 2d endless runner

I've been trying to figure this out exhaustively for the past few days and still haven't found an answer. I have an endless runner built using swift where the character is fixed and the terrain moves ...
0
votes
1answer
30 views

Swift - How do I detect the exact point at which two “SKPhysicsBody(edgeFromPoint:” type physics bodies intersect in sprite kit

I have two physics bodies attached to two separate sprite nodes using Sprit Kit. One is a vertical line and one is a horizontal line: //sprite with horizontal physics body ...
1
vote
2answers
88 views

How to detect collision of a wall with grid movement?

I have this little game, where my player is moving around a simple level, using a grid based movement script (See code below). My problem is that I have tried to implement a 2D raycast, which has to ...
0
votes
1answer
54 views

Collision between a sphere and a mesh(height-map)

I am trying to implement a method that detects the collision between a sphere and a mesh and reflects the vector of speed. I have a method, that detects a collision between a sphere and a triangle and ...
1
vote
1answer
202 views

Why does my character stop a little before landing on the ground?

I made a little game with side-scrolling and a box (the player) jumping across the level. The simple physics are almost done, but I have two problem with the way things behave: On landing, the box ...
0
votes
0answers
25 views

JBullet - Two RigidBodies will not collide

I am adding two ships into my collision world. (The green dots are the collision shape (an ObjectArrayList) that I am passing to the ConvexHullShape) However they don't seem to collide. In fact, ...
0
votes
2answers
99 views

How to keep a shape inside a rectangle

So i'm making a game which is based on randomly generated rooms and i need a way to keep the player inside them and make the player glide when he collides with the room's bounds. I currently have a ...
0
votes
2answers
45 views

Ball oblique impact physic in Java?

I know Q3 + Q4 = 90 I searched internet and many physic topics, but not found how to calculate this values in Java? (I found V3 and V4 but not found Q3 and Q4) So how can i calculate V3, V4, ...
0
votes
1answer
83 views

Platformer collision advice

I've been trying to implement collision for a platformer but I can't find a good way to get the collision of certain sides without it get glitchy. So i try to get the collision of the top rectangle ...
-1
votes
1answer
79 views

How can i fix my Ground detection code?

My ground detection works by checking if the player's x position is between the range of a sprite xpos+16 and xpos-16 if it is,then it uses a separate axis theorem on the y axis to see if the player ...
0
votes
1answer
45 views

Moving a Polygon based on Camera position [JAVA]

I am in the process of implementing TMX Maps (made in Tiled) for my game. In Tiled, I can create polygons, which leaves a tag, containing the points. Loading in these points to a Polygon ...
1
vote
0answers
22 views

How do I find the intersection point from the Expanding Polytope Algorithm?

I've successfully implemented a 2D version of the GJK and EPA algorithms which gives me correct collision information, including collision normal and penetration depth. What it doesn't give me ...
1
vote
1answer
103 views

Unity sprite with higher sorting layer not firing its OnMouseDown function

I have 2 objects, both have a Box collider 2D. The first object is on the Level1 Sorting Layer and has a Tile script attached to it. The second object is on the Level0 Sorting Layer and doesn't have ...
0
votes
3answers
123 views

Bringing islands close together programmatically

I generate island/continent maps and I want to make a grand archipelago of sorts where all these islands are located. The problem is that I don't know a smart way to place the islands programmatically ...
0
votes
1answer
60 views

Unity PHOTON/PUN Collision Detection

I am trying to create a virtual 3D chat room based on character interaction (just like in Sims2), so I have added a collider on the "user's in-game character". The problem is that when I enable the ...
1
vote
2answers
95 views

Can't find out why aren't those collisions framerate independent

I'm making a 2D Platform game and I'm having trouble with my collision detection. It doesn't seems to be framerate independent even though I used deltatime there. The problem is that at 60fps, a ...
0
votes
0answers
19 views

How do I find at least the closest penetrating point with SAT? [duplicate]

For more accurate simulations, I want to find the closest point of another polygon to one polygon's center when they collide. Is this possible with the SAT algorithm? Is it a good strategy at all for ...
1
vote
1answer
44 views

Check for collision without any built-in collision functions

Is it possible to check for a collision between gameObjects without using the built-in functions OnCollisionEnter, OnCollisionStay, or OnCollisionExit? Preferably a solution without the use of ...
1
vote
2answers
67 views

How can I detect a perfect passageway for collision detection?

The problem is when I move diagonal it moves fractions of units and therefore my coordinates might be a fraction of a unit say (40,400) might be actually (40.12,400.40) but another problem is my pink ...
0
votes
1answer
61 views

2d Collision detection response equation doesn't work

I am currently doing some game engine programming as a hobby. I have been working on getting the collision detection working for a while now, and I'm at my wits end with it. I started with this ...