Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

Let's discuss common collision algorithms. AABB minecraft like game [closed]

I am transitioning to 3D game development and currently working on collision. Naive Algorithm I previously made an algorithm for axis aligned bounding boxes which works in two dimensions. My approach ...
0 votes
0 answers
72 views

Why do my VR avatar's hands clip through my chair object?

I have spent hours on this task and I feel it's high time I asked. My avatar hands go into my chair GameObject. I added a box collider to the hands of my avatar and unchecked "Is Trigger". I ...
1 vote
1 answer
54 views

How to settle a rigid body to rest on flat surface

I am trying to simulate the behaviour of a rigid body, for example a cube, while it settles on a flat surface. Let's say it lends on an edge or even on a corner, and now it has to settle and remain on ...
0 votes
0 answers
25 views

Box2D Lite demo by Erin Catto : How Baumgarte stablisation works with Arbiter and what "Allow Slope" means?

Hello Game physics developers, Hope you are having a good time. I am trying to write basic 3D box-box rigid body collison resolution. I was able to copy paste BIG BEEP formula to generate two impulse ...
0 votes
0 answers
27 views

Motion of a cube after it bounces off a floor

I am trying to simulate what happens when a cube hits the floor after free fall. I am considering a situation in which cube hits the floor with its edge. There is obviously reaction force from the ...
1 vote
1 answer
108 views

How do I make multiple circles bounce of each other

How will I calculate the direction of the circles when they hit each other? (there is no change in speed, there is no mass, and all circles have the same radius) ...
  • 13
0 votes
1 answer
62 views

How do you resolve continuous collision in a multi body system?

I've been trying to figure this out for weeks but every resource only provides answers for a single body. As far as I can tell for a single body you Find the time of impact Step up to that time ...
  • 1
0 votes
0 answers
25 views

Dynamic bodies falling onto static body tunnel through each other or fail to bounce

I have a problem with Box2D when 2 dynamic bodies fall onto a static body located below when their restitution is non-zero. They tunnel through each other instead of a rigid elastic bounce. If I treat ...
0 votes
1 answer
79 views

How to stop player when they hit an axis aligned bounding box?

I'm in the process of creating a game using electron and HTML5. It's going to be a pretty basic story-based platformer, but I'm ...
15 votes
4 answers
3k views

Solving obtuse interior corner collisions

I'm having some trouble solving collisions in obtuse interior corners. In the above image, the black circle is the initial position, the red is the projected movement (straight into the corner), the ...
  • 751
0 votes
0 answers
106 views

Rigid Body is rolling/spinning on collision, is there a way to have it slide on surfaces instead?

I have a rigid body with a sphere as a collision mesh which can move and rotate freely. It realistically spins when colliding with other objects, but this is annoying from a gameplay standpoint. Is ...
3 votes
1 answer
123 views

Is there a generic formula to determine the angle of deflection off of a rectangle?

I have a perfect 2D system, with no friction, elasticity, etc. A ball is colliding with a rectangle. I know the angle of the motion of the ball in degrees. I want to figure out how said angle will ...
user avatar
2 votes
0 answers
94 views

Transferring linear momentum to angular momentum in Godot

In Godot, when a 2D rigid body collides with another body, it seems that the force is absorbed/used to bounce back, but it doesn't give an "angular impulse" to the object, for instance if a ...
0 votes
1 answer
149 views

Get the closest point on an SDF

Is there a cheap and effective way to get the closest point on an SDF? (signed distance field). CodeParade made a video on a game he developed that uses SDF collisions with a sphere, how did he do it? ...
0 votes
1 answer
81 views

How to allow a CharacterController to pass through walls?

I'm developing a game in which bot-controlled billboards pursue you. If the bot gets stuck behind a wall for a while, not able to catch the player, I want the bot to pass through the wall. I'm using a ...
0 votes
2 answers
92 views

Changing falling behavior of my object after collision to go gradually down and not instantly

Context I'm here today to figure out how can I have an object to fall down after colliding to another object. In my case, I'm remaking Flappy Bird and trying to reapply some of the physics in place ...
1 vote
0 answers
19 views

numeric inaccuracy collision resolution [duplicate]

I need an idea, please :). I've implemented moving AABB -> AABB collision detection (3D), returning the time of impact. When I calculate time_of_impact * velocity...
  • 111
0 votes
0 answers
37 views

Sliding convex polygon against other polygons

Is there a common practice for resolving polygon/polygon collision by sliding as shown in the image? The moving polygon is convex (and if it makes it any easier, a quadrilateral), but the polygons it ...
  • 751
0 votes
2 answers
133 views

Cue ball direction after collision

I am trying to figure out the velocity of ball A after collision, which is V2.A as seen in the figure. I know that the velocity of ball A is perpendicular to the line connecting centre of ball A and B ...
  • 57
2 votes
1 answer
155 views

Movement system for thousands of entities

I want to implement a movement system for armies of multiple thousand units. However, I struggle to get the movement "stable" when there are more than a few hundred units. The problem: When ...
  • 23
0 votes
0 answers
327 views

Using a Raycast to stop the player from going through walls

I've been having this problem in the last couple of hours and I was just thinking if someone could help me figure it out, since I am unfortunately not a programmer, or at least a good one at all. I'm ...
1 vote
1 answer
64 views

Rectangular Collision Resolution behaving incorrectly on corners

I'm currently writing a simple game engine and encountered an error while trying to resolve rectangular collisions. When an object moves diagonally and collides with a solid object I only correct it ...
0 votes
0 answers
84 views

How can I fix this wall jittering in capsule to octree collision?

In the three.js example for a first person game https://threejs.org/examples/?q=game#games_fps you should notice that at the corners it gets stuck, seemingly because it collides with one side, then ...
0 votes
1 answer
99 views

How do I make soft tile-based collision?

I've done some simple tile based collision: Move character, look up the tiles moved into, and if solid, push them back out. I move on each axis independently, because this gets them to eject properly. ...
  • 191
0 votes
1 answer
238 views

How to resolve swept AABB collision when two boxes are hit at exactly the same time?

I've read many posts here about sweeping AABB collisions and the corner problem. But I still couldn't solve the problem. In the image below, the object starts touching both boxes, and when I apply a ...
-1 votes
1 answer
258 views

javascript top down circle to circle smooth collision detection

I've been looking through a lot of answers here: Resolving Circle-Circle collision Circle to Circle collision, checking each circle against all others Nestling into contact with a group of physics ...
0 votes
1 answer
56 views

Problems with reflection angles during collision resolution between circle and rectangle vertices (2D)

I'm having a hard time trying to resolve the reflexion angles when the ball collides with one of the brick's corners (square vertices) in my brick breaker game. The collision detection system is ...
  • 13
0 votes
0 answers
134 views

2D circle and rotated square collision detection and response

I'm creating a 2D multiplayer game in javascript, but I'm actually struggling with a problem (not really a problem, but I don't know how to do). I'm actually trying to make my player (circle hitbox) ...
0 votes
0 answers
147 views

How do I respond to AABB collisions?

I'm coding a physics engine in Javascript. Forces, Gravity, Friction, AABBs are taken care of. Now, the big question: how do I respond to AABB collisions? Right now, when an object collides, it prints ...
  • 1
0 votes
1 answer
95 views

Box2D make dynamic body fixed on the y axes

I working on a game project using C++ with SMFL and Box2d. I'm basically recreating the game "Jump and Hover", a simple platform game. In the game ther is an platform thats "hovering&...
1 vote
1 answer
249 views

Find closest open space in grid of rectangles?

I'm making a builder game where you snap arbitrarily sized rectangles into a 2D grid. I want the player to be able to drag and drop these rectangles anywhere on the grid, but prevent collisions (i.e., ...
  • 13
1 vote
0 answers
260 views

Wall sliding collision resolution with multiple objects

TLDR My collision resolution algorithm with wall sliding works perfect for multiple walls but it fails when the angle of the corner of two walls is less than 90 degrees. (acute angles) and the player ...
  • 115
0 votes
2 answers
189 views

How to reconcile collision detection with delta time?

In my simulation, if an object is inside another object, it imparts a force proportional to the distance inside the object (basically a separation force). I am having an issue though where the ...
1 vote
0 answers
83 views

2D tilebased collision system

Hi i want to implement a collision system (something comparable to super mario) I would like it to have objects which can have any size (the hitbox of it) And it should be reasonably efficient (so ...
  • 11
0 votes
1 answer
29 views

Box2D & Processing - Collision location randomly assigned to center point

I am working on a particle simulation using Box2D with Processing. The setup: I generate 4 kinds of particles that exist in equal amounts (for instance 200 in total, 50 each). They are (for now) ...
  • 11
1 vote
1 answer
147 views

How can I improve collision padding against level geometry in my 2D game?

I'm scripting my own collision logic for a 2D game that works like this: Boxcast in the direction of movement against appropriate colliders in the scene If a ...
1 vote
2 answers
392 views

Voxel terrain vs AABB collision detection

I am trying to implement collision detection in a voxel game. Currently I check the side of the collision by finding the closest side and checking whether there isn't a solid block next to that side. ...
0 votes
1 answer
105 views

Problems with collision order of resolution

I have two objects, A and B, and I need help to solve the following problem about the collision resolution order: A and B are moving with the same speed, and they don't move both at the same time A ...
0 votes
0 answers
28 views

Disk-line segment collision detection vulnerable to clipping through small angles

I've implemented a simple disk-line segment collision detection and response algorithm. It's not swept, so if going fast enough it can clip, and fact that the collision detection occurs "after&...
0 votes
0 answers
90 views

How can i fix my enemy movement, and collision?

I recently started a project with some friends, Its a simple java game and im having issue getting the Collision and enemy movement working properly. Using this: ...
  • 1
0 votes
2 answers
263 views

Rectangle collision not working!

I'm making a simple game in C# and i'm having some problems with rectangle collisions. What i'm doing is checking if two rectangles intersects, checking the side of collision and then moving the ...
  • 51
0 votes
1 answer
199 views

Collision Resolution for Height Maps

GameDev StackExchange! I've written height map collision detection into my game, but I've been struggling on how to get the resolution step to work well with player movement. (This is in 3D, by the ...
0 votes
1 answer
75 views

Surface-Sphere collision response

I'm making basketball throwing simulator and I have two questions about the collision response. To make collision response with any surface like the wall or ground, I'm using the following formulas to ...
  • 1
-1 votes
1 answer
55 views

How to stop player from slingshotting across my game window

In my pygame dungeon rpg when my player collides with a wall at the top or the bottom of its rect and I move the player in either x-direction, the player gets slingshotted off the screen. Using print ...
2 votes
1 answer
105 views

How do I calculate impulse when an object collides with plane(fixed object)?

I've been developing simple 3D impulse-based physics engine. I calculate impulse as follows: $$j_r = \frac{-1(1+e)v_r\cdot\hat n} {m_1^{-1}+\bbox[yellow,5px,border:2px solid red]{m_2^{-1}}+(I_1^{-1}(...
  • 31
0 votes
1 answer
927 views

How to stop Players and Enemies from pushing each other

I am developing 2D Top-Down RPG game. I have script that makes my enemy follow the player, and when they touch the player, the player will start to lose HP. Everything works well, but when they touch ...
0 votes
1 answer
2k views

In collision detection/resolution, what is a "collide and slide" algorithm?

Can anyone help me to better understand the concepts behind this algorithm? I've seen this phrase come up several times during my research into creating a 3D character controller, but am having issues ...
0 votes
0 answers
57 views

3D collision response advice for complex meshes

I am trying to use my own collision detection system in Unity to speed up my game. My problem is that when rigid bodies sit on top of static bodies, they will balance unrealistically on one edge or a ...
0 votes
0 answers
46 views

Character controller collision edge cases

Im trying to implement a basic 3d character controller. The way i currently do collision is; i check wether or not the character is inside any geometry before movement. If this is the case, i find the ...
0 votes
0 answers
89 views

Regarding static collision resolution between two circles

I have some code that resolves the positions of two circles when they collide: ...
  • 123

1
2 3 4 5
9