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
0answers
23 views

Collision detection bug in java applet

In my maze game applet I'm having a little bug. Collision detection works but sometimes my character can go into walls. More precisely it detects collision and moves the character into the wall. It ...
2
votes
1answer
40 views

Pair collision detection on quadtree

I'm planning to use a quadtree for optimizing collision detection. But this quadtree can handle only one type of objects (so I used a base class for my objects). If I use double dispatch after two ...
1
vote
0answers
75 views

Collision detection implementation suggestions

I'm working on a simple 2D game involving a rotating octagonal ring where a sphere sprite moves up/down avoiding objects as the ring rotates faster and faster. I'm having a difficult time with the ...
2
votes
2answers
50 views

Rendering after interpolating, renders inside/outside other objects

So, we're working out our interpolated render-coordinates during our render call and it's doing a fantastic job of smoothing everything out. All is great and collision detection is working to a ...
0
votes
1answer
38 views

Crafty - How to get the id of the collision element?

As the topic says, I want to know how to get the ID of an active colliding entity. My Player Entity is called with Crafty.e("Player") Please notice, that I do not want the ID of my Player Entity. ...
0
votes
0answers
26 views

Locate point of collision for two moving lines

I am trying to implement a continuous collision detection system that checks collision between two polygons for a certain time step, concave or convex. It makes the simplification that the path ...
1
vote
2answers
84 views

How to do collision detection on marching cubes terrain?

I'm writing the physics part of my game engine. The world uses the marching cubes algorithm on a 3d perlin noise to make the terrain. How do I do collision detection on the resulting mesh? I can't ...
0
votes
1answer
46 views

Getting a pixel of Sprite at the cursor position in Unity

Summary: I've been trying to figure out a way to use simple box colliders as a nice and efficient "first pass" collider. For the "second pass", I want to check that the area clicked has an alpha value ...
0
votes
1answer
44 views

Collision bug with gravity in slick2D

I have fixed some of the previous problem. The collision when running into a corner(a wall on two sides) however is still not working. When the player runs into a corner he just falls down and out of ...
0
votes
1answer
34 views

Depth of overlap between circle and rectangle

I have a circle and a rectangle one of the two objects is moving the other is static. How can I prevent them from overlapping each other? For now there is only one thing that I don't know how to ...
0
votes
2answers
63 views

Vertical Collision Detection, Falling Through Ground

After much work trying to learn collision system theory and apply it, I've got my collision system working for the most part. The player can collide horizontally with no issue, sliding against walls, ...
0
votes
1answer
29 views

Calculate an approximate distance between two rigid bodies or OOB

Is there any easy way to get an approximate distance between two OOB? I searched around and people talk about GJK algorithm, however I don't see it returning the distance between two convex objects ...
0
votes
0answers
19 views

How to determine positions to draw lines on a screen with AndEngine

I have a screen (480x800), M(mx, my) is a static point, and N(nx,ny) is a dynamic point on screen. Position of N(nx, ny) depends position of touch. I want to determine position of P(?,?) and Q(?,?) to ...
0
votes
1answer
59 views

Unity Physics Material - Character Slides Too Much

I am currently working on a 2D platformer in Unity. I am using a prefab from the AssetStore for my character (The last paragraph contains a link to the prefab). The character has a circle collider for ...
2
votes
1answer
76 views

How to calculate max region/area of 2d circles?

I have some 2d circles on a plane, each has its own minRadius and maxRadius. When two circles collides, both of them will shrink their radius, so the actual radius of a circle is in range [minRadius, ...
1
vote
1answer
48 views

Collision detection against complex shapes and curves

I am new in game development and for simple games bounding box collision is fine. However, let's say you have a shape or bitmap like this: This is just an example but if you had more elaborate ...
2
votes
1answer
57 views

Wall-sliding Collision Response Only Works On One Axis (2D)

"sprite" is the player object, velocity is a Vec2 that tracks movement (is set to -1, 1, or 0 at any given time), each sprite in "sprites" is a wall of the same size as the player (everyone is a block ...
1
vote
1answer
85 views

How to make an object move again after being stopped by collision in Unity?

I have a player object which position is always centered on the main camera's viewport. This object has a Rigidbody 2D, a box and circle collider. The player moves around a level, the level has a ...
0
votes
1answer
18 views

Can GJK be used with the same “direction finding method” every time?

In my deliberations on GJK (after watching http://mollyrocket.com/849) I came up with the idea that it ins not neccessary to use different methods for getting the new direction in the doSimplex ...
2
votes
1answer
63 views

AABB implementation

I have seen in some texts and tutorials on the web where an AABB is implemented as a position vector and then half-width and half-height vectors. What is the advantage in using the half-width and ...
0
votes
1answer
153 views

Simple collision detection in Unity 2D

I realise other posts exist with this topic yet none have gone into enough detail for me. I am attempting to create a 2D game in Unity using C# as my scripting language. Basically I have two objects, ...
0
votes
0answers
42 views

How could I implement 3D player collision with rotation in LWJGL?

I have a problem with my current collision implementation. Currently for player collision, I just use an AABB where I check if another AABB is in the way of the player, as shown in this code. (The ...
1
vote
1answer
52 views

Unity Problem with colliding instances of same object

I want to check if object's instance is overlapping with another instance (any spawned object with another spawned object, not necessary the same object). I'm doing this by detecting collisions ...
1
vote
3answers
177 views

What datastructure would you use for a collision-detection in a tilemap?

Currently I save those blocks in my map that could be colliding with the player in a HashMap (Vector2, Block). So the Vector2 represents the coordinates of the blog. Whenever the player moves I then ...
0
votes
1answer
99 views

How do I find the angle between two 3D angles represented in this form?

I have two 3D angles, represented by [a1,a2] [a1,a2] where the a2 is < 180. My coordinates are represented as [X,Y,Z], where X,Y,Z are 64 bit ints (longs in my lang). My direction angles are ...
0
votes
0answers
38 views

Sporadic collision detection between prefab and target?

I'm trying to get a enemy prefab to track a static target. The "enemy" is spawned into the playing area and using A* Pathfinding, tracks down the target by name. The prefab is destroyed upon collision ...
0
votes
0answers
36 views

Image layer into tile map concept

I'm not really familiar with programming but I wanted to ask if someone could give me some tips. I would like my game maps could be easily designed in some kind of graphics editor. I came with an idea ...
2
votes
1answer
95 views

How can I ensure character weapon is also included in collision detection?

I have two models, my player character and her weapon. Each can be controlled independently (that is, I allow the player to aim the weapon). The object hierarchy is: Character (with ...
0
votes
2answers
118 views

Deal Damage to Player

I have to make a simple "avalanche" game to show I know how to use the physics and creating terrain. But I actually wanted to go a little above and beyond and actually give the player health so there ...
1
vote
0answers
39 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
110 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
111 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
61 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
103 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
69 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
28 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
52 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
50 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
106 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
98 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
1answer
81 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
62 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
47 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
30 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
252 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
0answers
28 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
71 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 ...
0
votes
1answer
57 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
109 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 ...