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)

5
votes
0answers
77 views

Collisions between players in multiplayer racing game

I'm creating a simple racing game (spaceships, no gravity) using p2.js, phaser and node.js. What I have done: Client receives world state from server: extrapolate other players based on latest ...
4
votes
0answers
42 views

2d platformer distance-based collision bug

I'm writing a 2d platformer collision algorithm, and I have everything almost working, except for one last remaining bug. I do collision by measuring the distance between the player's center and the ...
4
votes
0answers
126 views

How can I create a set of collision points for an arbitrary mesh?

In my project I am working on automatically deforming an arbitrary mesh with respect to another arbitrary mesh, within the context of user generated content, similar to this deformer being developed ...
3
votes
0answers
66 views

Check if a point is touching a user drawn curve in HTML5 canvas

I am having trouble detecting whether a ball is colliding with a red curve. The curve below is an example of what a user may draw on to the canvas. I can't think of any fast ways to detect collision ...
2
votes
0answers
22 views

What is the formula for the collision of two “stretched spheres”?

In Smash Bros Melee, hitboxes aren't perfect spheres or boxes. They are, instead, a shape that looks like a continuous line of consecutive spheres: I.e., the geometry can represented as: Hitbox :...
2
votes
0answers
82 views

How to detect collisions with a material in Unity 5?

I've got a simple car game with 3 different surfaces: grass, tar and sand. I have a basic skid smoke system, but I want the color of the skid smoke to change depending on the surface, for example on ...
2
votes
0answers
73 views

My collision detection is not working when I rotate my mesh in three.js

I am trying to move a ball mesh through a maze. The maze belongs to a parent object3d. My issue is that when I move the ball I can't detect collision right well because in the rotation, the axis ...
2
votes
0answers
57 views

Mouse Interaction in 3D space (ray)

I use this code public static Ray CalculateRay(Vector2 mouseLocation, Matrix view, Matrix projection, Viewport viewport) { Vector3 nearPoint = viewport.Unproject(new Vector3(...
2
votes
0answers
46 views

What is the most efficient way to determine collision path

I am trying to create a game in which I need to know if two objects will collide in the future, and when. I have both object's position, radius (they are circles) and velocity. A specific example of ...
2
votes
0answers
31 views

Field of vision - Objective-c

Here's where I'm at. Here's where I want to be Here's how it's drawn SKShapeNode *fov = [SKShapeNode node]; UIBezierPath *fovPath = [[UIBezierPath alloc] init]; [fovPath moveToPoint:CGPointMake(...
2
votes
0answers
160 views

Implementing Separating Axis Theorem to Detect and Handle Sliding Collisions

I am having a bit of difficulty detecting collisions properly with separating axis theorem. My code seems to be giving a lot of false alarms. Also, I've looked into implementing sliding collisions ...
2
votes
0answers
257 views

How do I compute the angle between a pixel on an irregular curve and a circle colliding with it?

I'm building a custom physics engine to accompany a level-editor. This image shows how the level-editor outputs levels: Now, some explanation is in order. The curve is defined by the red points. ...
2
votes
0answers
325 views

beginContact triggered more than once on some objects

Short version: It looks like beginContact is detecting continuous collisions. I'd like to avoid that. Long version : I use Box2Dweb to write a 2D platformer. It's my first game using this lib, and, ...
2
votes
0answers
609 views

Why does my RigidBody collision fail depending on which entity is moving?

I am working on a UDK project and have a collision problem. I have a Crate which is a kActor with RigidBody physics and my player who is a Pawn. When my player moves and collides with the crate, the ...
1
vote
0answers
38 views

When to Use Spatial Hashing vs Bounding Volume Hierarchy?

I've been slowly working on implementing a spatial hashing function into Bullet Physics to see how well it will work in my game engine as a general use. Though as I'm starting to design it, I do ...
1
vote
0answers
37 views

How to manage collision of two player ?

I'm developing a multi-player car game. Suppose that car A hit car B: both A and B have Rigidbody and collision functions attached. Because car A hit car B i want to take actions only to car A (add ...
1
vote
0answers
44 views

How to integrate Tiled maps and collision detection with pygame?

I have been using pygame to make a simple rpg pokemon style game. To create maps I have used the Tiled map editor and then loading them into pygame using pytmx. I have heard that you can add object ...
1
vote
0answers
44 views

Game Physics: Calculating a collision response using the Separating Axis Theorem?

I am working on a project in which I have implemented the Separating Axis Theorem to detect collisions between objects. My current collision response is an object that contains whether it is ...
1
vote
0answers
38 views

Handle floating point precision errors in collision detection and resolution

I am experimenting with a continuous collision detection and response of points on a tile map. This are my results for now: I did this by shooting a ray (red line) from the current position (red ...
1
vote
0answers
74 views

Pixel by pixel collision detection pinball

I'm currently working on a Pinball game using the HTML5 Canvas and JavaScript. Right now I'm getting a hard time with the pixel by pixel collision, which is fundamental because of the flippers. Right ...
1
vote
0answers
38 views

Swept AABB vs AABB Calculation Error

I'm having issues running simple AABB vs AABB collision detection. I'm able to successfully detect collisions without checking with velocity. But for some reason my code keeps prematurely firing ...
1
vote
0answers
58 views

Phaser - Add collision to a specific tilemap layer?

In Tiled I made two layers, "Background" and "Walls" and I have positioned them accordingly, both as a background and walls, or if you prefer "Not being able to collide" and "Being able to collide". ...
1
vote
0answers
29 views

Exact collision detection for high-detail deformable triangular meshes

What robust methods or approaches exist for exact collision detection involving high-detail, deformable geometry? The kind of mesh I am describing is a surface that is specified as a triangulated ...
1
vote
0answers
49 views

2d Circle different ARC's Collision detection

The way to detect collision between 2 circles or circle and line . using trigonometry But now i like be able to detect which part of the circle arcs im hitting , for example i divided my circle to 4 ...
1
vote
0answers
41 views

Cell height with heightmap for collision detection

Hello everyone I'm programming a game with c++ and openGL. My world is generated from a heightmap (100x100 matrix with values 0-255) and now I need a function that returns the actual height based on ...
1
vote
0answers
55 views

Implementing Separating Axis Theorem in 3D with C++/OpenGL

Using an Octree data structure provided to me by an acquaintance that gives min/max bounding box values, I've been able to write an algorithm that takes the global centre points, face normals and half ...
1
vote
0answers
59 views

Game is responding very slowly?

I have a very simple app which removes buttons and re-adds buttons to certain layouts when a button is clicked. The problem is, this process is taking a very long time. My question is: How can I make ...
1
vote
0answers
41 views

How can I move my button?

I am new to animations in android. I was wondering, is there a way to keep a button moving around the screen, bouncing off the walls, until it gets clicked? I was thinking to do something like this: ...
1
vote
0answers
112 views

Character Movement and Collision with Ragdoll Rigidbodies/Colliders?

I have a player character that I'm moving with a character controller script and it is moved by applying velocity to a Ridigbody. This works when I have a rigidbody component on the player but my ...
1
vote
0answers
53 views

GJK algorithm in case of circle and polygon?

I wonder if it's possible to modify GJK so I can use it to detect collision between circle and n points polygon. I implemented for polygon and polygon before, and I tried modifying the support ...
1
vote
0answers
71 views

XNA Collision In An Entity Part System

I've hit a loss in creating a "game engine" in XNA, I'm extremely confused over how to approach collision in an Entity-Part System ( following this as a reference ). I can make all the entities with a ...
1
vote
0answers
41 views

Detecting the two Vector3 that determine the bottom-edge of the side of a box-collider that had collision (with C#)

So, I understand that plenty of questions have been posted on how to detect which side of a Box Collider had collision. However, what I am trying to achieve is a little different. I want to find out, ...
1
vote
0answers
751 views

Colliding without physics in Unity: is it possible to put OnTriggerEnter in the moving character?

My main question is: is it possible to put OnTriggerEnter in a script that goes attached to the moving character instead of to trigger area/object? Let me explain my exact need. I want to detect the ...
1
vote
0answers
144 views

How is curved 2d ground is implemented in real games?

I'm developing a 2d platformer (inspired by N game) and I already successfully implemented circle-convex, convex-convex and circle-circle collision. But now I want to be able to make platform that ...
1
vote
0answers
255 views

Java 3D collision detection with JBullet

So I have spent a long time trying to work on a collision detection system from scratch for own game engine and came up fruitless due to lack of time. Finally I decided to try to use Jbullet to try to ...
1
vote
0answers
75 views

Efficient Collision detection for polygons (fleet) in an RTS

I'm trying to make an RTS for android using libgdx. I would like to have collision detection to be able to detect ships inside the range of weapons and collision between my bullets and the ships. So ...
1
vote
0answers
41 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
0answers
310 views

Using Box2D in LibGDX, is there a reason a fixture set to be a sensor would only -sometimes- detect a collision?

I am working on a 2D game in LibGDX. Currently, I am testing interactions between a player's weapon and enemies - in particular, a sword and an enemy monster. The player has a hurtbox and the sword ...
1
vote
0answers
32 views

Colliding wiith a smooth line of blocks

I'm having a strange problem. I'm creating a 2D platformer, and creating the gameplay map by reading a csv file and placing prefabs of the appropriate type on map. One part of the map is a simple ...
1
vote
0answers
68 views

Collision Detection Between 3 or More Objects

Say I have a 2D grid of particles, and I wanted to find out if any of them were colliding. In my head I have come up with a system where you check every possible location for each particle in that '...
1
vote
0answers
89 views

Is there a way to rotate an Ellipse in libGDX for collision detection purposes?

I'm trying to avoid having multiple overlapping Circles for a UFO-shaped sprite. Two Ellipse objects will perfectly cover the shape of my UFO, but I want to tilt/rotate the UFO when flying left and ...
1
vote
0answers
62 views

Manual response when 2 shapes made of rectangular volumes collide

I have 2 compound objects made of rectangular blocks. One of them (the one that is moving) has a script that listens to OnTrigger callbacks. What I need is to position the moving compound object on ...
1
vote
0answers
228 views

2D Distance Field as collision handler method

Pixeljunk Shooter has really cool fluid simulation. I found the dev's video explaining what they did. Here I understand that it is particle based simulation Smoothed Particle Hydrodynamic I can ...
1
vote
0answers
152 views

How do I detect collisions between a particle-based net and a ball?

I've implemented a net using Verlet integration and many points connected with constrains; like this demo, but in 3D. I want to implement collision detection between this net and a ball (like in a ...
1
vote
0answers
136 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 ...
1
vote
0answers
261 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 ...
1
vote
0answers
77 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 ...
1
vote
0answers
61 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 ...
1
vote
0answers
538 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 ...
1
vote
0answers
80 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 ...