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
vote
0answers
53 views

Pygame's sprite.collide_circle() missing several frames of head-on collision

I've spent hours trying to figure why my collision detection was so crappy, with sprites visibly ovellaping for several frames, when I noticed the culprit could be pygame's detection callback ...
2
votes
2answers
124 views

How to move towards a point in 2D, stopping at obstacles

I want to do a 2D game, where you can mouse click anywhere on the map and the player will go there. If there is obstacle in the way, the player will go as close as possible to where you clicked ...
0
votes
0answers
34 views

Calculating co-ordinates of a line/ray that's increasing in height with a known slope/radians. Height increase is also known

basically in my game I'm firing a line. The line's anchor point is at the very bottom of it, and half of its width. When I fire the line, its rotation gets set to face where we want it to go. Then, ...
3
votes
1answer
122 views

How to detect if a ball will collide with another, and the normal vector of the collision?

So I have a 2D game involving balls (circles) colliding. I want to be able to detect if two balls will collide before it happens, and the normal vector of the collision if a collision is going to ...
0
votes
1answer
78 views

Collision detection doesn't register until player sprite jumps

I have implemented a shooting mechanic into my game, and the act of shooting works fine. The shooting work is done in my "game1" class. The issue that arises is when I incorporate collision detection ...
0
votes
3answers
115 views

2D collisions between 2 arrays

I'm trying to do collision detection between bullets and enemies in my game. But it's very unpredictable and sometimes it works, sometimes it doesn't (bullet goes straight through without doing ...
1
vote
1answer
91 views

collision in different layer

I have a game object called game object 1 on screen. It holds an image called red . when i drag an image called "animal" on a game object 1 collision happening fine and destroys the "animal" in same ...
0
votes
0answers
49 views

How to put a rectangle around an ImageView in Android

I'm trying to make a rectangle have the same x, y, height and width values as an ImageView for collision detection purposes. Is there a way to do this?
2
votes
0answers
53 views

Determine wheter an octree node needs to be continue

For collision detection (moving vs. non-moving) in my current project, I decided to implement an octree approach after the preselection. The only collision detection I'm currently using is a ...
0
votes
0answers
70 views

Ray-Triangle Intersection Detection using Barycentric Coordinates

I am attempting to convert the algorithm from http://www.cbloom.com/3d/techdocs/fast_ray_tri.txt to java code, but my solution does not function correctly. The only intentional change I made was for ...
-2
votes
2answers
124 views

AI shooting through walls [closed]

I made a AI shooting script for my new game but the problem is that the AI ignores the walls and shoots through walls. This is my ai script : #pragma strict public var rocketPrefab : Transform; ...
0
votes
1answer
122 views

Game object position issue in unity3d

I have a set of objects placed on the same layer where all the objects are invisible except one .When i drag an object in to a selected area the current dragged object get destroyed and the object ...
0
votes
2answers
101 views

Different kinds of collision detection in Android

Are there any other ways to detect collision between two objects besides the bounding rectangle method and downloading another class to put into Android?
0
votes
1answer
188 views

C# - Monogame- Collision Detection Sprite walking through platforms

I am blanking on the logic here. How do I get it so that my sprite doesn't run through a block. It only repels if the center of the player sprite is higher than the bottom of the block. But when it ...
1
vote
2answers
78 views

C# - Collision Detection problem with platforms on Monogame(XNA)

So I am having issues with my platformer that I am developing. I can detect collisions fine when there are a line of parralel blocks or even single blocks. The issue I have is when blocks form an L ...
0
votes
0answers
34 views

How to handle car game circuits in a top-down view?

I'm already using a physics engine (box2d) but i have no idea about how should I implement circuit's path with wall collision. I tought about checkpoints but this doesn't solve the wall collision.
1
vote
2answers
546 views

OnCollisionEnter2D not being called

I'm fairly new to the world of Unity, and am adding collision detection for the first time through RigidBody2D (as this game is 2D). First of all, here is some relevant information: Unity Version: ...
0
votes
1answer
66 views

Making a Collision Detection for ImageViews

I'm trying to make a collision detection system for two ImageViews, but I can't seem to figure it out. I've tried doing several things from StackOverflow and other places, but they don't work. One ...
0
votes
1answer
123 views

libgdx custom shape overlap detecting

I'm writing my game on libgdx w/o any of those extensions like box2d and whatsoever. But right now I'm forcing problem with overlapping detection. I need to detect if bullet (which is always in ...
1
vote
1answer
88 views

Help finding time of collision

I am making a simple game right now and am struggling with collision response. My goal is to someday be able to turn it into a 2D platformer but I have a long way to go. I am currently making this in ...
1
vote
2answers
127 views

Simple square hit the wall and turn around without stopping

I am coding and making my very first plat former game in Unity 4.5 2D. Basically I want my character to ping pong between two walls. I have set up a GroundCheck and CeilingCheck. I was thinking to ...
0
votes
1answer
65 views

Continous collision happening in Unity2d

I am working on Unity2d. I have a game object called gameobject1 on screen. It holds an image (named "state"). When I drag a tree on a gameobject1 collision is happening continuosly in the same layer ...
0
votes
1answer
252 views

Swinging a sword in Xcode with Sprite Kit

I'm working on making an RPG in Xcode, and I'm having a major gameplay issue when it comes to having my character swing his sword in a way that is realistic and gameplay compatible. Right now, when ...
0
votes
2answers
124 views

Slopes vs. Rectangles: Different Collision Points

My platformer has both rectangular tiles and right-triangle slopes with rectangular hitboxes. My sprites are also rectangular. Collision with only rectangular tiles works well. Even if there are ...
1
vote
2answers
213 views

How to detect collision on specific part of the sprite node

I have a spike and a ball is falling down, when the ball touches the top point of the spike, I want to make the ball invisible, and when it touches on the other part i.e on the sides I don't want to ...
-1
votes
1answer
189 views

Trajectory Projectile with Collision Detection

Right now I am trying to create projectile for cannon in which I want to detect collision also. At present I have simple working projectile after using two references Unity – How to display ...
0
votes
2answers
135 views

How do i make collision detection more effective?

In the game i am developing, there are 220 circles that are not moving. One of the circles is moving and in every update, it iterates through an ArrayList that contains all the circles and check if it ...
0
votes
1answer
107 views

2D terrain with midpoint displacement and collision

I followed this theory Here to implement a simple scrolling 2D terrain for my running game. I am used to dealing with collision via a tile system but am looking for a good theory on how to perform ...
1
vote
0answers
96 views

LibGdx Triangle Collision

I'm back with another question. I'm trying to get a collision between an actor and a sprite. With the actor, which only moves upwards and downwards, I've got no problem since it's shape is a ...
0
votes
1answer
99 views

How do I handle this type of collision?

So I've been messing around with simple game development for a while and just found an interesting game idea here . I'm using SFML 2.1 with C++ and so far I have a tilemap in a VertexArray using a ...
2
votes
1answer
208 views

How do I efficiently collide and match groups of coloured circles?

I am new to game programming and working on clone of this game in libgdx. The game has some static balls and one ball that moves. I want to check if the moving ball collides with any static ones, but ...
0
votes
2answers
83 views

Collision detection: Swinging bat/racket and ball

I am programming a side-view tennis game, inspired by an old arcade game, using Javscript and HTML5 canvas elements. The player can move left and right and holds a racket at arms length which can be ...
1
vote
2answers
210 views

How to check for collisions in “diagonal” tiles?

I want to create a tiled map in the following scheme: The player should be able to walk on the blue line (street). Now, what is the best way to solve collision detection in this case? For example, ...
2
votes
2answers
531 views

How to simulate wind in 2D

for a 2D scenario, I wanted to have a fan blow at an object and make it move with the "wind", how can I simulate the wind under these circumstances?
1
vote
2answers
233 views

How to resolve a collision at the border between two colliders?

I'm writing a simple non-physical one-circle-to-many-rectangles collision detector/resolver. For collision detection, I'm using a very common algorithm, and it's working pretty well. For collision ...
0
votes
1answer
86 views

How should I detect collisions with objects on a “timeline”?

I'd like to replicate this game's mechanic of the player smashing walls with a precise timing to a background rhythm. How should I check when each wall should be broken? Does the player animation use ...
1
vote
1answer
107 views

Collision between player and heightmap

Im programming a small project, an opengl height map. It is build of triangles, which points are fit to the right y position (read out of an image). The player is represanted by a cuboid. (p1, p2, ...
2
votes
2answers
144 views

Pathplanning A* Getting stuck in wall

I'm having a problem with my pathplanning. I can plan a path and make my character follow it, that's not a problem but then i plan a path around a wall it takes the shortest way as A* suggests, which ...
2
votes
4answers
84 views

Identifying groupings of objects

I have a cloud of objects, each with a 3D position, and I want to pick out tight groups of these objects. Specifically, I want to find all objects which form a grouping of radius r within a large ...
5
votes
1answer
151 views

Self colliding cloth physics

I've previously simulated cloth using Verlet integration but couldn't successfully get the cloth to collide with itself in an efficient way. The reason being is because I used a brute force algorithm ...
1
vote
1answer
149 views

Trigger for Melee-attack not working

I'm currently trying to add a melee-slash attack to my Sidescroller. For that I decided to to have an invisible box-colliders infront of my character. My idea is to activate it when the attack-key is ...
1
vote
1answer
80 views

Different bounding volumes for culling and collision detection

Should an object in a 3D-engine use different bounding volumes for collision-detection (broad-phase) and culling? Basically class renderBounds and class physBounds versus class boundingVolume? Each ...
2
votes
1answer
94 views

Is there a way to view all colliders in a unity project at runtime (after the game have been deployed)?

I'm have created a small Unity project but physics has weird behavior (bug). Unfortunately it only happens on some specific hardware (after build), not on development machine. I don't know what is ...
1
vote
3answers
116 views

Removing something on Collision?

I have my collision detection code working so how would I tell my HealthPickup to disappear when my Player collides with it? I haven't played around with it yet but I think I may have to somehow ...
0
votes
2answers
349 views

Java collision detection and player movement: tips

I have read a short guide for game develompent (java, without external libraries). I'm facing with collision detection and player (and bullets) movements. Now i put the code. Most of it is taken ...
0
votes
0answers
21 views

Resolving penetration by adding the penetration vector to the colliding entities

During collisions I find the penetration vector of the colliding entities (using SAT). Should I add it to the position of entityA, of entityB, or to both?
1
vote
0answers
58 views

Resolving penentration after collision using Separating Axis Thereom

I implemented collision detection in my game using SAT. The detection works, but I'm trying to use the algorithm to figure out the penetration vector of the two OBBs and push them apart (before doing ...
0
votes
1answer
45 views

How to resolve OBB collision penetration?

I would think this is a common issue, but I couldn't find an answer that helped me. Help would be appreciated. In my game I have rectangular objects. They have rotating bounding box, aka not AABB but ...
1
vote
0answers
50 views

How to Calculate K-Dops Faster

Ok so I have my general understanding of K-Dops for collision detection. I understand how to calculate them. I also understand the super slow way of recalculating them. Example: I have a simple ...
2
votes
2answers
192 views

XNA - Making 2D Hexagons Connect With Each Other

Hey so I'm working on a top-down 2D strategy game in XNA, and the tiles are hexagons. I can't have a grid because of the game mechanics, so everything has its own location, and every tile object is ...