Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
1 vote
0 answers
16 views

Applying impulses simultaneously at each contact point or sequentially?

I'm coding a 2d physics engine in python, and I'm struggling to understand the right way to implement collision resolution when there are multiple contact points. Consider a very simple collision case ...
snickerdoodles777's user avatar
0 votes
0 answers
50 views

How to make this soft sphere with Unity?

What methods should be used to create such a sphere in UNITY? This collider seems to deform in real-time, squeezing and monitoring collision information when the sphere collides. I cannot achieve this ...
asd's user avatar
  • 1
0 votes
1 answer
57 views

Object collision and vector reflection for complex polygons?

I am currently creating an environment to train aim-bot AI's for my game. It is a 2d world made of complex polygons, and the goal is to have the AI's shoot ricocheting bullets. Using a ray-casting ...
Beluker's user avatar
0 votes
0 answers
59 views

AABB Collision Resolution Per Face

I have this function that detect the collision of two AABBs: ...
Scollier's user avatar
  • 124
0 votes
1 answer
56 views

Circle to Polygon & Circle to Circle Velocity Resolution

I am working a 2d physics engine. Polygon to polygon collision and velocity resolution works without issue, but I am struggling to get working circle to circle and circle to polygon velocity working ...
TrippR's user avatar
  • 3
2 votes
0 answers
71 views

How to choose the normal for collision?

Here two objects collide and I use impulse to calculate the velocity after the collision. But because there are two objects, there are two normals. Calculating impulse only requires one normal. My ...
noodle_run's user avatar
0 votes
0 answers
54 views

Physics Engine Collision Response

I'm making a game engine with my integrated physics engine and I've encountered a problem where rigidbodies tend to over react in collisions and move around without and intention to slow down, I have ...
Gelis 07's user avatar
0 votes
0 answers
52 views

Is it possible to create an actual working physics-based ball bearing in Roblox engine?

Will it allow for making actual wheels, gears and roller coasters?
ivan866's user avatar
  • 141
0 votes
0 answers
15 views

"Sticking" occurs in collision constraint solution

Two rectangles collide, use the following formula to calculate: $$ J = \begin{vmatrix} J_{1} \\ J_{2} \\ J_{3} \\ \end{vmatrix} $$ $$ J_{n} = \begin{vmatrix} \overrightarrow{n} & \overrightarrow{...
noodle_run's user avatar
0 votes
2 answers
71 views

How to make a character fall through a BoxCollider2D?

Currently trying to make a 2D game in Unity and I'm trying to make the part where if the character falls in a hole it goes back to spawn, but I currently have a ground box collider blocking it, which ...
TheEpikDuck's user avatar
0 votes
0 answers
29 views

Collision resolution in a game with a teleport ability

I am making a simple MOBA game. I have implemented AABB swept collision detection for player and projectile movement and it works well. It works by computing time of intersection, so the AABBs never ...
user1953221's user avatar
0 votes
0 answers
54 views

How to prevent jarring collision resolution when enabling a ragdoll?

After enabling a rigid body and collider on an object that is overlapping with another object, it applies a large amount of force to the object, so it jumps out of the overlap. The problem is worse ...
virtouso's user avatar
  • 2,628
0 votes
1 answer
67 views

Bounding Box/Rectangle collision glitches

I've been working on this golf game for a couple of weeks and have been trying to create a reliable collision system for whenever a golf ball (mini golf) hits a block. I'm using regular rectangular ...
Jet's user avatar
  • 1
0 votes
1 answer
48 views

3D Impulse based collision resolution not behaving correctly, what could be wrong?

I've implemented a collision resolution system based on Ian Mellington's System Cyclone and afterwards based on the Game Physics Cookbook. Currently the last one is implemented. For some reason the ...
Martin's user avatar
  • 1
1 vote
0 answers
55 views

Separating axis theorem implementation results in limitless extending colliders along the Z axis

I am trying to implement SAT and it works except for the fact that colliders extend infinitely along the Z axis and I can never get past them. I also have confirmed that ...
Jakob Tadej Vrtačnik's user avatar
0 votes
2 answers
86 views

Bouncing balls miss collisions, bounce the wrong direction, of lose momentum on one axis when hitting a corner

I am making a 2D game where balls bounce from the edges of the screen, However, there seem to be two types of issues with this kind of bounce method, and every tutorial I checked uses the same method. ...
ZozeR's user avatar
  • 42
3 votes
1 answer
151 views

How to make a CharacterBody2D slide out of StaticBody2D instead of teleporting?

I am trying to replicate Mario Maker's On/Off switches in Godot 4.1. In my current version, if the player got stuck inside the block after it was toggled on, the player just teleports out it. I know ...
Jason O'Neil's user avatar
0 votes
1 answer
123 views

Why check the ball and brick collision twice?

I watched https://www.youtube.com/watch?v=F86edI_EF3s. I believe the following code is the complete code https://github.com/games50/breakout/tree/master/breakout13 And https://github.com/games50/...
shingo.nakanishi's user avatar
3 votes
0 answers
148 views

2D Tilemap Collision resolution in C#/MonoGame

A bit of context about my game: I'm nearly 2 years deep into development of my game called Cosmorists. It's programmed in C# using the .NET 7.0.11 framework, and MonoGame 3.8.1 game framework and it's ...
Stellar Roots's user avatar
2 votes
1 answer
346 views

Character controller that can handle sloped terrain and boxy ledge traversal

I am working on a character controller for a 3D platformer in Unity. I cannot find an approach that satisfies me. I have experimented with these approaches in order to learn about their virtues and ...
DyingIsFun's user avatar
  • 1,307
0 votes
1 answer
75 views

How to calculate angular momentum of two colliding bodies about their shared center of mass in 2D?

I'm following this guide to implementing collisions in 2D physics. It shows this diagram, but I don't understand how to calculate the values of Da and ...
noodle_run's user avatar
1 vote
1 answer
62 views

Player stays grounded when jumping at the side of a two tile high wall

I am currently developing a simple Super Mario Bros. like platformer in Cocos2d-x v2. I am now at the step of doing wall sliding with two axis-aligned bounding boxes (tiles) but I've not quite found ...
MikaKC's user avatar
  • 11
1 vote
0 answers
121 views

I don't want my plane to go trough walls, I want it to stop on obstacles

I'm currently working on my first Unity Learn code challenge, making a Flappy Bird style game where a plane needs to fly through gaps between wall obstacles. I've successfully implemented all the ...
Mila Data's user avatar
0 votes
1 answer
45 views

How can I prevent my ball from slowing down when it makes contact with the corners of colliders

I'm trying to make a game where the player has to destroy blocks. But when the player collides with the corners of the blocks, the player's velocity slows down, or even stops. How can I ignore the ...
Smizzles's user avatar
0 votes
0 answers
108 views

Sequential Impulses in 3D with friction

I'm currently writing a physics simulation in 3D, that uses sequential impulses. I've managed to implement normal impulses, but I can't get friction impulses to work. As I understand I first get two ...
xxnoflz's user avatar
0 votes
1 answer
78 views

How to separate player characters occupying the same board game space?

I'm trying to create a 2D "board game" type thing in Unity, and I would like each player to be visible within the same space. The way I want to do that is by having it so when a player ...
Konxovar's user avatar
0 votes
0 answers
49 views

Calculate direction to push player away from wall

I'm trying to write a common 2D game and using vectors for physics. I have 1 wall and 1 player object that can move diagonally (both are squares without rotation). When the player object collides with ...
ZAK's user avatar
  • 1
1 vote
1 answer
180 views

How to prevent colliders from knocking each other back before being destroyed?

For context, I have a player that can use a bow or a spear to shoot enemies in a 2D side scroller game. The bow shoots arrows and the spear shoots itself, and they both have rigidbody2Ds attached. ...
Peecee's user avatar
  • 13
0 votes
0 answers
106 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 ...
Craving_gold's user avatar
1 vote
1 answer
66 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 ...
Žarko Tomičić's user avatar
0 votes
0 answers
59 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 ...
Žarko Tomičić's user avatar
1 vote
1 answer
280 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) ...
dechire's user avatar
  • 13
0 votes
1 answer
250 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 ...
gjh33's user avatar
  • 1
0 votes
0 answers
60 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 ...
Simon Zvara's user avatar
0 votes
1 answer
250 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 ...
Blue Herring's user avatar
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 ...
IanLarson's user avatar
  • 771
0 votes
0 answers
235 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 ...
Mazz1224's user avatar
3 votes
1 answer
150 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
256 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 ...
Pop Flamingo's user avatar
1 vote
1 answer
568 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? ...
Creeper Cloud's user avatar
0 votes
1 answer
517 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 ...
silver takana's user avatar
0 votes
2 answers
268 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 ...
Zeid Tisnes's user avatar
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...
Aitch's user avatar
  • 111
0 votes
0 answers
54 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 ...
IanLarson's user avatar
  • 771
0 votes
2 answers
302 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 ...
ahmedkl's user avatar
  • 57
2 votes
1 answer
394 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 ...
Gileos's user avatar
  • 23
0 votes
0 answers
650 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 ...
mikeadam's user avatar
1 vote
1 answer
98 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 ...
Fundudeone's user avatar
0 votes
1 answer
169 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. ...
Lake's user avatar
  • 191
0 votes
1 answer
717 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 ...
Noise Noise's user avatar

1
2 3 4 5
9