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
17 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
3 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
30 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
75 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
0answers
50 views

Hexagonal Map tiles check for walkability

Using Openfl for a game using hexongal 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
39 views

Should I handle mobile collision from the mob or projectile?

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
27 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
9 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
28 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
17 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
67 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
46 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
184 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
23 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
62 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
33 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
73 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
77 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
35 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
20 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
62 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
121 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
39 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
79 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
43 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
65 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
56 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 ...
0
votes
1answer
33 views

How and where to handle collisions? [Java] [duplicate]

Okay, so in my game I have a Level class, which hold an ArrayList of entities. In addition to this, I store the Player here (naturally enough). In my Entity class, I have a method which checks for ...
0
votes
3answers
82 views

2D Box Collision Trouble

Hello I am trying to handle some simple box collision (axis-aligned) in my top-down 2d game, but running into a problem. My game is running at a fixed time step, and checks for player-wall collision ...
0
votes
1answer
63 views

How should I improve my game world? [closed]

I'm in the process of teaching myself game development, and I'm trying to learn 3D, and started on a basic 3D game. The actual problem I've encountered is with level design, I'm using cubes all over ...
0
votes
1answer
37 views

Handling collision with LWJGL rectangles

I'm testing collision with other rectangles so I can implement it into my current project. The problem is the rectangle starts at the right x and y, but I'm not sure where exactly they are. I'm pretty ...
1
vote
1answer
39 views

In a collision detection loop, when do I apply the velocity?

I'm writing a really basic collision detection system (AABB vs AABB, AABB vs Circle, Circle vs Circle), and I've just got to the point of writing the actual loop which iterates the objects and checks ...
0
votes
0answers
42 views

(LibGDX/JAVA) How can I get a rectangle to rotate with this pendulum so I can start detecting collisions?

One of the objects in my game is a pendulum that swings in a semi-circle. This is done by having an update() method like this: public void update() { angleAcceleration = +1.81 / length * ...
0
votes
0answers
39 views

Unity material is missing after compilation

I have a piece of code that signals the player that a projectile has hit its target. Everything works fine during the playmode, however after I compile it, it acts as if there was a missing material. ...
0
votes
1answer
58 views

Game lags when my player collides with a specific object (solution known, unsure how to implement)

I'm developing a game in Android using LibGDX (although this is more of a JAVA problem than an engine problem). My aim is to have my player bounce off one spring onto another that will eventually take ...
0
votes
0answers
50 views

Creating a custom collider shape in unity, and performance concerns

I want to create a custom chaped collider in unity to create point-defense triggers for objects. I have a spherical collider that triggers for attacking objects that enter it already. However I want ...
0
votes
1answer
55 views

Collision response callback

First at all, I'm not asking how to handle or detect collision. I already have that. My actual situation is, I have a system collision and I detect the collisions. Every collision detected is store ...
0
votes
0answers
43 views

My “puck” model object falls right through the “table” model in jmonkeyengine

So I am trying to learn Jmonkey, I have understood everything so far, and I thought i understood how to make objects solid, so things cant go through each other. When i created my Collision shapes, I ...
11
votes
2answers
2k views

How does one perform collision detection on objects made of many small triangles?

I understand that any shape can be created (or approximated) by smaller triangles. Any rectangle can be created by 2 smaller triangles. Any circle can be created by many thin "pizza slice" triangles. ...
1
vote
3answers
100 views

Detect if two objects are going to crash

i am working on a car game where i am to create an AI, in the game there are other cars and a few objects moving around that i do not want to crash with, i have the speed, position and direction of ...
1
vote
0answers
47 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 ...
0
votes
1answer
67 views

After collision of two objects change the sprite and move in its direction

I've searched a lot for this question but there was no answer that could solve the problem I'm having. I'm new to unity and a very naive developer.I'm making a game in unity using c# and it's like a ...
0
votes
2answers
56 views

onCollisionEnter2D not behaving as expected

I have two game objects. They both have a Rigid Body 2D and a Box Collider 2D components. One of them also has script component. Below is the full script using UnityEngine; using System.Collections; ...
0
votes
1answer
29 views

How can I get the “SelfActor” in OnBeginActorOverlap?

The signature it takes is void ( AActor* OtherActor ) However, The actor that is handling this event is not involved in the overlap. How can I access the actor that owns this delegate? Assuming I ...
0
votes
0answers
33 views

Collision Detection acting weird

I started learning programming in java. and I've decided to make a simple game but, got a problem in collision detection. The problem here is that the collision detection is sometimes not working. ...
2
votes
2answers
59 views

Subdived objects in different shapes

Currently I'm working on an Android OpenGL 3D game and now I want to implement a collision detection. For this I want to use oriented bounding boxes but here is my problem. For a normal oriented ...
0
votes
1answer
61 views

Fast(er(est)) fullscreen/scene collision detection technique (“selection buffer”)

My vertex format has a float4 Flags element used to pass miscellaneous data to shaders. Each mouse-collidable object that is rendered has a unique ObjectID that is written to an ObjectID-rendertarget ...
0
votes
1answer
59 views

How can I split up a large model into an octree codewise?

For collision detection, I am attempting to split up a large model into an octree. If we take this black thing thing to be the ship (104,000 vertices): Then I would like to split up the faces I ...
0
votes
1answer
77 views

Fast mesh collision 3D (C# XNA)

I'm trying to write a simple program where a 3D landscape can be walked about with a basic camera. However, I've found it very difficult to do even simple collisions with my terrain. I'm wondering if ...