Skip to main content

# Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

427 questions
Filter by
Sorted by
Tagged with
1 vote
1 answer
386 views

### Problem with diagonal collision response using PyGame

So I have been having this problem for the last few days and it has me really frustrated. What I am trying to do is resolve collisions with custom hitboxes in PyGame and it looks something like this: ...
• 21
0 votes
1 answer
84 views

### Way to Reset Varible After Collision Resolution

I have some code that, if a player is in contact with the wall, prevents the player from moving. Is there any way with this code to reset the collide variable, and if not, what would be the simplest ...
0 votes
1 answer
228 views

### Way to Get Collision Box Width Gamemaker

I was coding the wall collision system for my game, and I wanted to do it using intersect boundaries instead of checking every step if they are off the screen. When the player crosses the boundary ...
1 vote
2 answers
1k views

### How to resolve a collision in 2D game?

At the moment I have built a custom Vector2 class and have a character object that has an acceleration vector (modified by vector forces), a velocity, and a position as well as bounding boxes for ...
• 87
1 vote
2 answers
170 views

### How To Resolve Collision Before it Occurs

I have 2 objects, A and B, in a 2 dimensional space. If I know A is trying to move by vector M (that is to add vector M to the positional vector of A), and that A will collide with B after A moves, ...
1 vote
1 answer
2k views

### What to do with collision detection?

I am able to get collision detection (CD) into my game but... what do I do with it? Do I push the player back to the last location? Something else? I am programming the game in C++ using the Irrlicht ...
0 votes
2 answers
3k views

### Dragging a Rigidbody2D without passing through obstacles

I have this body of code written for an object that needs to be an obstacle and another object that is draggable. I have colliders on both and a kinematic rigidbody on the draggable object, but the ...
1 vote
1 answer
3k views

### Measure force of an impact to deal damage

I don't know how to name what I am searching for... Force, Impact? It's easier to explain with an image for me. We have two GameObjects with colliders, A and B. They can move in any direction (top ...
• 113
0 votes
1 answer
172 views

### Collision detection and solution causes teleportation on corners

I am making my own game engine on Python and I got stuck with collision between objects. ...
1 vote
0 answers
38 views

• 21
1 vote
2 answers
94 views

### Why are my shapes teleporting to the center of the map?

I am making a Diep.io Clone, and everything was going smooth until I made a collision resolution system for when a shape collides with another shape. Instead of them bouncing off of each other, they ...
• 73
1 vote
0 answers
104 views

### High level overview when handling collision detection (or resolution) with overlapping when already touching

I'm looking for some advice on handling collision detection when you've already collided (at a high level). Suppose we're using 32-bit floating points, but with the constraint that the entire level ...
• 343
0 votes
1 answer
693 views

### How could I implement collision resolution with MonoGame

I'm building a game engine (for learning and self-development purpose), and I'm starting implementing collision resolution, I already have the collision detection part but I cant' find any good ...
1 vote
2 answers
150 views

### When should you check collisions?

Suppose a basic game with several circles drawn to screen. The user can select and drag any ball and move it around the screen. Should the selected ball overlap with any other ball on screen, the ...
• 113
0 votes
1 answer
182 views

### How to Prevent Sticking to Overhead Slopes

I am having an issue with overhead slopes in my 2D platformer. I implement slopes using a LineSegment class. My player sprite has a spine attribute which is just a line segment from the midtop of his ...
• 1,307
0 votes
1 answer
223 views

### How to implement wall-following behavior?

I am working on an action platformer and am trying to implement an enemy with simple wall-following behavior. I want the enemy to follow the boundary of whatever connected constellation of walls it is ...
• 1,307
2 votes
0 answers
739 views

### Resolving collision with multiple objects

I already have SAT implemented for collision detection and MTV computation and it works totally fine when my character collides with only one object. But it's possible that there is a collision with ...
0 votes
0 answers
665 views

### 3D Coulomb Friction - Use Collision Impulse To Calculate Friction Force?

I've been using this document to learn how to implement a very basic physics engine. The section on Coulomb Friction on page 55-56 (marked as pages 43-44) confuses me. It observes that the friction ...