Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

0
votes
1answer
27 views

Detect collision point [duplicate]

I'm writing a 3D rigid body physics engine, I am using OpenGl for simulation. Only convex objects are considered. My question involves how to detect the point of ...
0
votes
0answers
40 views

Objects are stumbling in place continuously. How to fix that?

I have a nasty problem with my physics engine. Objects sometimes just jump in place, or roll left and right. Main game loop works in that manner: Every living object is updated (it changes velocity, ...
1
vote
1answer
42 views

How to make object that moves with constant speed not overshoot the object it collides with?

To learn LOVE2D I am creating a simple project. Player moves the square with arrows keys until it hits the goal square, at which point the game is won. ...
2
votes
0answers
49 views

How to resolve a sphere-mesh collision?

I'm making a rolling-ball type game, and I can't seem to get my sphere-mesh collision code working properly. Currently what I have for the main loop (in regards to collision) is the following: ...
1
vote
1answer
56 views

2D AABB Collision

Detecting a 2d collision is easy, but after that, I'm having trouble fixing the AABB position to where it should be. I think it would be something like ...
0
votes
1answer
45 views

2D character tips over sideways after collision with platform

This is what happens when my player character jumps and collides with a platform from the side. The player character tilts over or ends up upside-down or sometimes on its back. How can I prevent this?...
0
votes
0answers
18 views

How to check if moving OOB will resolve the collision?

I now (thanks to several questions that were already asked here) that I can use SAT to check if two OOB are intersecting or not. But what if they are already intersecting? My situation is: I have two ...
2
votes
1answer
59 views

Issues with AABB on a platformer game

i'm facing an issue at the moment in my javascript/html platformer game that despite searching for this issue i can't solve. The problem is this: When i place two platforms next to each other and the ...
1
vote
0answers
27 views

Handling strange physics behaviour while sliding between coplanar surfaces

We've got a character setup based around manually resolving collisions, and we're using bullet to do so. Our characters have a kinematic rigidbody to push things around, but their movement and ...
0
votes
0answers
39 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
24 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
91 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
41 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
52 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
34 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
93 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
29 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
128 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
125 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
312 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
126 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
114 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
101 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
108 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 ...
1
vote
1answer
64 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
919 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
175 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
166 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
92 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
1answer
546 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
40 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
138 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 ...
2
votes
1answer
156 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}{...
1
vote
2answers
84 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
51 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
1answer
211 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
117 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
141 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
85 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
214 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
311 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
38 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
363 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
53 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
380 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
133 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
693 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
74 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
270 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 ...