Stack Exchange Network

Stack Exchange network consists of 175 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

Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

0
votes
0answers
28 views

2D AABB Swept Collision Algorithm Premature Collision

I've been following this pseudo code for my implementation of 2D AABB Swept Collision: ...
0
votes
0answers
23 views

Adding a collider to a wheel in a way that does not interfere with the suspension

I want to add a collider to a wheel so that it does not interfere with the suspension in any way but will allow the car to run into walls or other cars. The implementation of the wheel is as follows: ...
0
votes
1answer
62 views

2d Rectangle Collision Resolution: Find rollback point

I have a 2-part question: 1: I have 2 rectangles, A and B. B is a wall and A is moving. My simple logic here is every time A moves, it moves based on some (x,y) offset and then checks if it collided ...
1
vote
1answer
36 views

Detecting a Collision Between Two Bodies Undergoing Multiple Transformations

I have been searching for an answer to this for a really long time and I have not found any definitive answers as of yet. What I am trying to do is determine if and when two bodies collided between ...
-1
votes
1answer
50 views

How can I prevent the balls from overlapping?

I am making a ball rolling game controlled by tilting an accelerometer. In my game multiple balls overlap, so they end up showing as only one ball. How can I solve this problem, so balls do not ...
0
votes
0answers
27 views

How can I calculate the initial velocity of a cue ball after hitting it with a cue stick?

I'm currently building a billiard game, and I'm faced with the following problem: A cue ball is hit with a stick at an angle equal to Θ. Given that the stick is hit at the exact center of the ball, ...
0
votes
2answers
38 views

How do you make a particle system collision add a force to an object towards the particle system?

I have a lightning particle that gets shot at the ground. I want the particles to collide with the object they hit and add an upward force. I tried just entering a negative force in the Collider Force ...
0
votes
0answers
24 views

How to fix 3D AABB Collision not working on corners?

I'm currently working on a minecraft clone and right now trying to implement player to terrain collision. My approach is to get the blocks which the player might collide with through the collision box ...
1
vote
1answer
89 views

2d side scroller slope physics and collisions

In old 2d games such as double dragon, streets of rage etc. where the player could move “up and down” on the y-axis to give an illusion of depth (as opposed to something like Mario) how were slopes ...
0
votes
1answer
83 views

Terrain collision with sphere and OBB

I'm implementing my physics engine for my 3D game. So far I've been able to implement collision detection between OBB, spheres and planes. The engine generate contacts and resolve them with an ...
2
votes
1answer
214 views

AABB to AABB collision response

I am currently trying to resolve collision between two AABBs. I already have a function that can detect if the the two boxes are colliding and returns true if the two boxes are colliding. The problem ...
1
vote
1answer
119 views

How to allow to slide rectangle to not colliding with corners between two rectagles?

I am detecting each side of collision between two rectangles, and wen I collide them, lets say, with the left side, it also detects collision on the top side when I move to the top, and the downside ...
0
votes
2answers
91 views

How to use separating axis theorem to allow for sliding along walls

I'm making a 2D platformer game and using the separating axis theorem for collision detection, but I want the player to be able to walk along the ground and slide on walls and other stuff and I can't ...
0
votes
0answers
90 views

How can I get visually accurate collision normals with sphere collisions?

I'm solving simple 3D sphere collisions by checking the sphere for overlap with a mesh, finding the nearest point on that mesh's surface to the center of the sphere, and then resolving the collision ...
1
vote
1answer
84 views

Enemies overlapping

I have a simple WebGL maze game and has problem with enemies overlapping when they are going to target position. Now i'm detecting there collisions, but dont know what to do with them when they are ...
0
votes
0answers
33 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 ...
1
vote
1answer
60 views

Subtracting magnitude from 2D circle contact

I'm trying to create an agar.io clone. In agar.io, each player can have multiple cells that "chase" the mouse pointer. The cells can also have multiple masses and the velocity is tied to the mass. The ...
1
vote
4answers
515 views

2d Rectangle Collision Resolution

My Journey... I've long struggled with rectangle to rectangle collision resolution. I've been making games for almost 10 years and still have yet to find a foolproof, reliable strategy. When doing ...
0
votes
1answer
123 views

Finding the contact point of two spheres

Is there a way to get the normal and depth of two spheres that have collided. I know that it is something to do with the center and radius of two spheres but I am not sure what
0
votes
0answers
40 views

Collision resolution sticks instead of allowing sliding along an edge

My current collision resolution code gives a sticky feeling: ...
0
votes
0answers
118 views

How do I get an aabb's collision normal [duplicate]

I have two aabbs and I need to know the collision normal of the to help me slide the aabbs across themselves. I have searched google but nothing really came up. How do I get the collision normal of ...
3
votes
2answers
80 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 ...
0
votes
1answer
405 views

Unity3d physics stability with low fixed timestep

I'm developing a vehicle simulator game for mobile platforms. This vehicle has some hydraulic arms. I use hinge joints and configurable joints. There can be collisions to walls etc. When I set a low ...
1
vote
0answers
28 views

How to resolve collision of two or more linearly moving non-rotating axis-aligned 2d boxes?

Sorry for my bad english. In my game, to resolve collision of a moving-box (e.g. the player) and fixed-boxes (e.g. tiles) :- I check in advance whether a moving-box is going to collide with a ...
5
votes
1answer
113 views

Calculate bounce and friction after a projection-based collision

According to the N Tutorials, after a projection-based collision (i.e, adding a minimum translation vector to an object's position in order to bring it out of collision), bounce and friction are ...
1
vote
1answer
114 views

Impulse resolution for purely rotational collisions (relative linear velocity = 0)

I've been writing a basic physics engine, (loosely) following Randy Gaul's online tutorial. I have been using this equation that he derives: $$j=\frac{-(1+e)((V^A-V^B)*t)}{\frac{1}{{mass}^A}+\frac{1}{...
2
votes
2answers
83 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 ...
1
vote
0answers
44 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 ...
0
votes
0answers
113 views

2D Tiled-based Platformer Sloped ceiling

How can I do collision detection with a sloped ceiling in a 2D Tile-based Platformer? My collision-detection follows the technique described here: http://bitkidgames.com/?p=2221 On the page it ...
0
votes
1answer
169 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
2answers
116 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 ...
0
votes
1answer
129 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 ...
0
votes
1answer
83 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
vote
0answers
193 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
0answers
261 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 ...
1
vote
0answers
36 views

Weird issue in collision resolution of non-static bodies

I'm a bit of a beginner in engine development, so I decided to write my own engine from scratch so I could learn more about what happens under everything. I've been progressing fairly well, except ...
1
vote
0answers
313 views

2D physics engine: Impulse based collision response with contact point manifold

I'm implementing a 2D physics engine where collision response is based on impulse computation. I'm going to first expose the context, then the problem, and finally the questions. Context Simple ...
3
votes
1answer
52 views

Selective Collision Resolution While Rolling

I am working on a 2D action platformer in Pygame, though my question is a general one. The question concerns selective collision resolution. In short, I want certain collisions to be ignored while my ...
0
votes
1answer
316 views

Calculating collision of polygons

Say I have a multitude of 2D polygons floating about on a plane. These polygons can have any side count and aren't necessarily regular. Assuming I know absolutely everything about the polygons (area, ...
1
vote
1answer
120 views

Jitters in collision reaction

I'm working on a project for school and I'm having some trouble solving a bug. When the player collides with a rectangle the sprite/hitbox keeps jittering while the player has momentum in the ...
19
votes
7answers
7k views

How can I detect the player being crushed in a 2D platformer?

I'm checking collision for a platformer character as shown in #1. The red dots are the pixels that are checked and the grey lines indicate the axes they pertain to. I like the results I get from ...
4
votes
2answers
602 views

Collision Resolution of Axis-Aligned Bounding Boxes that Change Size

I am developing an action platformer in Python, with Pygame. That said, my question is a general one about collision resolution strategies. I use an axis-aligned bounding box for the purposes of ...
0
votes
2answers
72 views

Collision stickyness problem on multiple inputs

I've been trying for a couple of days to solve an issue I'm having with top-down 2D collisions, whenever I collide with tiles that have adjacent collidable tiles my player sticks to the wall, If I ...
1
vote
2answers
233 views

Why is my sliding AABB collision acting strange?

I'm working on a Minecraft like game engine and recently I've been trying to add good collision response which I have kind of. The collision response is perfect when I try and go through the right ...
1
vote
1answer
97 views

In what order should collisions be resolved?

I am creating my 2D game engine and I need to know if I should first move all objects and then resolve collisions with all objects or I should move and resolve collision one by one objects.
1
vote
1answer
194 views

How to get a translation vector in a certain direction? SAT

I'm using the seperating axis thereom for discrete collision detection. I have code to find the minnimum translation vector (or distance) to seperate two shapes but how can I adjust it to get a vector ...
1
vote
1answer
108 views

3d complex collision and trigger detection [closed]

I'm a Unity developer and I use monobehavior functions to dot things like collision detection. I have read about articles about collision detection. Most of them work with geometrical structures like ...
1
vote
1answer
107 views

Method for Resolving Multiple Penetration Vectors (3D)

I am currently doing OBB vs. OBB/Triangle collision resolution. I know that the penetration vectors I am getting are correct. I currently resolve the penetration vectors by subtracting them from the ...
0
votes
1answer
104 views

How to make top-down AABB collision response work properly in MonoGame?

I have a problem with top-down racing game I'm working on. I need to implement AABB collision with other cars and objects. But when going fast enough, the car can go through thin objects when hitting ...
3
votes
2answers
174 views

Collision avoidance not only AI wrong

I am trying to implement the game similar to Dota 2 or Warcraft 3. I want this: when user clicks the right mouse button I want to navigate to the click position. However if there is an obstacle in my ...