Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Collision detection is the determination of whether or not two or more entities make contact with each other during gameplay.

0
votes
0answers
14 views

How to calculate new lower/upper points of a 3D Bounding Box after rotation in Processing?

I have a BoundingBox class that I'll provide below. It works for moving objects, but not rotating ones, meaning that if I rotate the object that utilizes the boundingBox the boundingBox has no way to ...
0
votes
1answer
84 views

How to Design a Generic Collision Detection System?

I'm designing a C++ 2D collision module, and I ran into a problem designing a system where the collider is unaware of the shape it's colliding against. I'd like to have a abstract base class called ...
0
votes
0answers
7 views

Physics.IgnoreCollision not working right after invoked

When invoking Physics.IgnoreCollision in Unity, it seems work but it still have collision detection right after creation. I have this issue with ejecting empty case after gun fire, it's spawning ...
-1
votes
2answers
30 views

How to get color from texture at specific location in libgdx?

This is the screenshot of my game. This is a 2d platformer game where the player jumps to many differently colored tiles. On the left-hand top corner, there is a square tile which changes its color ...
2
votes
0answers
28 views

How do you find the collision between 3D boxes and 3D QUAD face meshes?

I have an axis aligned bounding boxes for 3D object collision, but I have a complex 3d mesh that's divided into 3d faces so I want to check for bounding boxes and collision with the faces of that ...
0
votes
1answer
51 views

How can i collide two bodies without filtering(collision filtering)?

I have two bodies with fixtures. One is platform or ground and other is the player itself.I want to collide the player to the platform without bit filtering.How can i do that?I can see the rectangular ...
0
votes
0answers
19 views

psuedo-3d collision in Unity

I'm recreating the movement system from the DS game Dragon Quest Heroes Rocket Slime. In the game, the player controls a slime that can stretch himself and blast in the direction he was stretching. ...
0
votes
1answer
25 views

Unity: Water shader vertex offset - how to add mesh collider which updates with vertex offset?

I have written a shader (in the new LWRP shader graph) which simulates an ocean with vertices which offset to create a moving "waves" effect. I believe that in order to have objects "float" on my ...
0
votes
1answer
22 views

How do you create hitboxes that will detect stationary targets too?

I've created a basic attack combo system that chains 3 attacks together. When the player clicks the mouse button, it enables a boxCollider2D attached to the player. The boxCollider is a trigger and ...
0
votes
0answers
22 views

Detecting collisions without rigidbody

I have a car with the following aspect: As you can see, colliders are locally static, because they are separated from the original rigidbody component. Well, as you can suppose, I have a problem, ...
0
votes
1answer
24 views

Does destroying body also destroys the sprite?

Suppose a sprite is attached to a box2d body. And world.destroyBody(b); is getting called then the sprite also get destroyed or it stays there in memory. In my ...
0
votes
0answers
14 views

Object moving by adding force to Rigidbody bouncing off where ground objects met

I have a object that moving by adding force to rigidbody. With just big flat plane, it works fine but with connected small planes, sometimes(actually not sometimes, a lot) the object bouncing off or ...
2
votes
0answers
118 views

Getting false positives with SAT

I've been trying to get proper collision detection with SAT in 3D. I started of with this post: How many and which axes to use for 3D OBB collision with SAT. I've been trying to get the right axis to ...
0
votes
0answers
15 views

Predicting collision angle between polygons

I have a collection of polygons that each is constituted by a collection of vertices and edges. All edges on the polygon are of unit length and thus edges only connect consecutive vertices. Edges on ...
1
vote
0answers
8 views

VRTK ignores IsTrigger

VRTK allow collision detection by adding the VRTK_HeadsetCollision, VRTK_BodyPhysics, VRTK_HeadsetFade and VRTK_HeadsetCollisionFade scripts into Unity. This works so that in VR when I walk through a ...
0
votes
0answers
53 views

Cache friendliness of AABB-Tree: binary vs N>2

I found that state-of-the-art physics engines like Bullet and Box2D all use binary AABB-Tree for broad-phase collision detection. I wonder, did anybody tested AABB-tree with >2 branches per node ? ...
0
votes
0answers
33 views

Unity 2D: Pixel-for-Pixel Collision

I'm making a 2D game which features a pixelated landscape. The landscape is quite large, meaning I do not want to use an edge collider to draw out the terrain manually. Is there a script/collider that ...
0
votes
1answer
26 views

2D Per Pixel Collision Detection using Animated Sprite

I am using MonoGame 3.6 and Visual Studio 2017. I have been trying to find a solution online to do per pixel collision detection using an animated sprite that I am drawing from a sprite sheet. Using ...
0
votes
3answers
152 views

How to optimize collisions

I'm building a 2D MORPG using JavaScript, Node JS and socket.io To prevent cheating, I have to run all collisions for all players on my server. I'm currently doing fairly simple square collisions ...
0
votes
0answers
51 views

Collisions between two objects in 2D space

I am implementing the collisions of my game in javascript, and at the moment what happens when the objects collide is that they have their speed changed to 0. What I'm starting to want to do is to ...
0
votes
2answers
31 views

Bug with OnColliderEnter/Exit when colliding with multiple objects at almost the same time

Unity Version: 2017.4.1f1 I currently have a game with a jumping mechanic. I only want the jump to work where you're on ground, so I have planes on top of everything, which, if you are on a plane, ...
0
votes
1answer
25 views

Can I test collision inside an edge collider area in Unity?

I draw a triangle with the edge collider2d and I want the player to make an event when he reaches this area, so I set the collider as a trigger and, I used the OnTriggerStay2d function in my code! ...
0
votes
1answer
56 views

Unity Tilemap one way collisions

How can we get one way collisions using Tilemaps in Unity? There doesn't seem to be much online regarding this topic yet. From this link: https://answers.unity.com/questions/1471156/how-to-make-one-...
0
votes
0answers
12 views

Box2d detect separated none blocking floor as blocking wall

I'm trying to make my character walk on walls, it all goes okay-ish currently until this situation. Here's an image to show you how the wall looks like https://www.dropbox.com/s/5oyn55qpzljlhnl/...
0
votes
0answers
23 views

What is the correct way to implement sweeping SAT?

I am trying to implement Sweeping SAT like described here http://realtimecollisiondetection.net/files/levine_swept_sat.txt and I have already seen the answer to this question Finding the contact point ...
0
votes
0answers
18 views

Player randomly “jumps” (height dependent on speed) when rolling along flat platform of great length despite removing friction entirely

The player is a ball, the "Knob" 2D primitive. I've attached my code, when rolling along, even slowly, the ball encounters some invisible surface defect, and "jumps" off the platform. This problem ...
0
votes
1answer
35 views

Collision not smooth in unity3d

I am working on a project(Racing car). When it hit an object the object should be destroyed. The Object is being destroyed when it is hit, but the car stops for a moment after hitting like an obstacle....
1
vote
0answers
37 views

How do I create a HeightField in pybullet?

I've been looking for documentation on PyBullet, the python implementation of Bullet, but I haven't yet found a way to implement the btHeightfieldTerrainShape collision object, which I need to make, ...
0
votes
1answer
30 views

Ray-box intersection problem

I try to implement ray-box intersection algorithm given by the following code. However, I'm not really understand for two cases as shown in the following figures. Firstly, when the box is located in ...
0
votes
2answers
23 views
0
votes
3answers
58 views

Is there a way to check if an object is currently colliding with anything?

I need to test from another Script on a different GameObject, whether a particular GameObject is colliding with anything (in particular using trigger). So, for my purpose, I don't need ...
0
votes
1answer
27 views

For loop only checking the last object

Hi I am using a for loop to check and see if my players character is colliding with a collision object in the game. But for some reason it only checks the last Rectangle of the list. ...
0
votes
0answers
8 views

Progressive lag with each collision iteration libGDX AIDE

Hello I am developing a game on my spare time with AIDE and libGDX. Though AIDE has some missing methods of the libGDX API and I had to create some workarounds to compensate for the missing methods. ...
0
votes
0answers
14 views
0
votes
0answers
26 views

which type of colliders are cheaper in calculation speccialy in unity?

first I want to know how colliders work specially in unity. for example certainly not all of collision calculation happen for all objects in every frame. I want to know when collision calculation ...
0
votes
1answer
61 views

Why RaycastAll misses some objects?

Update 2 (see below) I'm writing a turn-based game. During setup phase time scale modifier equals to 0, what prevents running of any physics-based code and FixedUpdates. User have freezed action and ...
0
votes
0answers
43 views

Game map for platformer megaman-style game

I want to make platformer game that would be sort of like megaman. I'm using SFML library for it. I have a problem with creating a map. Should I hardcode every single platform, add it colliders and so ...
0
votes
0answers
130 views

c++ separation steering algorithm showing weird results

I'm implementing a simple separation steering algorithm (for axis aligned 2D rectangles). The algorithm: For each rectangle (cell), check all others for overlap if overlaps, calculate difference in ...
0
votes
2answers
34 views

libgdx strange collision detection behaviour

I am currently developing a small Spaceshooter Clone. The project can be found on github I am having problems with my very simple collision detection (or better said some behaviour that I can't ...
0
votes
0answers
60 views

How to detect sprite overlap in Godot?

I am trying to check for pixel-perfect overlap between my player sprite and my enemy sprite. Because this kind of thing is computationally expensive, I only plan to do it if the bounding boxes of the ...
0
votes
1answer
63 views

Character collision detection on 2D array tileset based map

I have a very basic collision detection working, but not quite there yet. Now as I understand I'm only checking against the left top corner of the character for collision detection. And it only works ...
0
votes
1answer
30 views

Collision of grenadelauncher shell

The shell of a grenadelauncher is very small (10cm) and the speed is very fast (80m/s). Collision detection using colliders is impossible. To get the collision point of a rocket launcher I send a Ray ...
0
votes
1answer
60 views

Is there a way to invert collision detection in unity?

I'm trying to make a drag and drop tool to make maps in my game (dungeon crawl). I would like to use colliders to define geometry, just invert the case so that collisions are good, not colliding is ...
0
votes
1answer
45 views

How to get character position in 2D map array by its position on canvas

My arrayMap consists of 0, 1 and 2. 0 is water and character is allowed to be on. 1 and 2 are ground and the collision should happen. To get and check what array number the character is standing on, ...
1
vote
1answer
117 views

How to check if NPCs are on ground or not?

I'm using Unity Engine. I see the common way to check if player is on ground is shooting a Raycast: How to solve the ground check problem? How to check if grounded with rigidbody I have a simple ...
3
votes
2answers
62 views

Resolving Circle-Circle collision

If you have a stationary circle with radius x, and a moving circle with radius y, when a collision is detected, how can you resolve the collision, such that the moving circle stop? I.e. What would be ...
1
vote
2answers
86 views

What graph Search algorithm (s) that can simulate the behaviour of a human searching in a forest

We are building a game , where a group of humans(AI agents) have to wander seperatly throughout the forest looking for a collectable item. The forest is represented as a 2d graph with the item ...
0
votes
2answers
43 views

How do i manage skill collision target in Unity?

I wanted to make a skill that can be used by both Player & Enemy. How do I make it such that the skill will not be colliding with the owner/caster or colliding with both? One stupid way I have ...
0
votes
0answers
45 views

How to do proper collision detection on a tilemap array?

I want to implement a simple collision detection so that when my character hits one of the objects it can't move any further. I have seen some tutorials on collision but the thing is that they are ...
0
votes
1answer
66 views

Why is my AABB vs AABB code returning false positives

I am trying to do AABB vs AABB collision and the code is never finding a collision. ...