Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

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
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, ...
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
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. ...
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 ...
2
votes
1answer
153 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}{...
3
votes
1answer
222 views

Rigid body falls through static mesh even though collision is detected

I'm using Jitter Physics to create a game. For testing, I have ball (a spherical rigid body) falling onto a small box-like mesh. The problem is that the ball falls straight through the floor, even ...
1
vote
1answer
1k views

Cocos2dx+Chipmunk: Fully elastic collision between moving bodies

I'm using Cocos2dx and the built in Chipmunk physics engine, and currently I've got my PhysicsBodys' materials set up with: Density=0 Restitution=1 Friction=0 in ...
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
619 views

How to handle collision detection

So the way that I am doing the movement for my game is that you can left click a unit (which is just a rectangle object), and then it is selected. While it is selected, you can right click and that ...
2
votes
1answer
590 views

Collision in PyGame for spinning rectangular object.touching circles

I'm creating a variation of Pong. One of the differences is that I use a rectangular structure as the object which is being bounced around, and I use circles as paddles. So far, all the collision ...
1
vote
1answer
657 views

Cocos2d - Physics bodies randomly loosing Velocity along an axis after impact

This just started occurring and seems to randomly happen during, and between, game sessions. A dynamic moving body collides with a static body and instead of bouncing off looses (almost completely) it'...
0
votes
2answers
249 views

Why is my collision code blocking the player's movement in XNA?

I have the following code to check for collisions in my game, but this code doesn't work it as should. For example: I go from up to down and if collision is detect I can't turn right; if I go from ...
4
votes
5answers
1k views

Lunar Lander calculating gravity, acceleration and collision in GameMaker

I've already asked this on the GameMaker forums but had no response so far. I'm making a little Lunar Lander game as my first foray in to GameMaker, I'm wanting to have the ship land and take off ...
2
votes
1answer
58 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 ...
0
votes
1answer
121 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 ...
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
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
1answer
90 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 ...
6
votes
1answer
2k views

Calculating impulse with multiple collision points

In my amateur 2D rigid body physics engine for a game I react on collisions between two bodies with an impulse j (formula 11) as explained here. To calculate this impulse I need one contact point P ...
1
vote
4answers
907 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
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 ...
0
votes
0answers
38 views

2D AABB Swept Collision Algorithm Premature Collision

I've been following this pseudo code for my implementation of 2D AABB Swept Collision: ...
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 ...
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: ...
1
vote
2answers
503 views

Physics engine and squishing of stacked objects

I have a general question that seems to apply to most physics Engines (Box2D, Unity, Matter.js, …). I'm trying to make a tower of rectangular objects that are stacked on the [static/mass=infinity] ...
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 ...
-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
92 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 ...
2
votes
1answer
311 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
125 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 ...
1
vote
1answer
125 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
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 ...
2
votes
2answers
706 views

Pixel perfect collisions for platforms

I'm trying to create pixel perfect collision detection but I don't know how to handle collisions when there is a jump. Here I have one image of a sample map: But maybe I had a bad supposition ...
1
vote
1answer
107 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
1k views

LibGDX - Rectangle Collision and Response

I've been using LibGDX for the past few weeks and I have some problems that I need help on. What I need help on is understanding how to use LibGDX Rectangle class ...
2
votes
2answers
3k views

Find the Contact Normal of Rectangle Collision

It seems a lot of people have asked similar questions on this site, and every time it seems like a whole bunch of answers that don't work are given. Basically, I have two rectangles (AABBs) that ...
0
votes
1answer
129 views

Array Rectangle Collision Handling Inconsistency XNA 4.0 [closed]

I made a simple collision detection prototype.Here's the code for the Player class's collision handler: ...
4
votes
4answers
10k views

Collision between AABB and Circle

I'm programming collision systems for a 2D game engine. The idea is that different systems can interact with each other. So one of the cases would be check collisions between axis aligned bounding box ...
0
votes
1answer
171 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
2
votes
1answer
776 views

How to make a stack stable? Need help for an explicit resting contact scheme (2-dimensional)

Previously, I struggle with the sequential impulse-based method I developed. Thanks to jedediah referring me to this paper, I managed to rebuild the codes and implement the simultaneous impulse based ...
2
votes
2answers
1k views

2D multiple circle collision response

I'm trying to implement simple 2D circle collision system. There are circles with different radiuses and velocities (the larger the circle the slower it is). Contrary to all the questions on the Stack,...
2
votes
1answer
279 views

How to calculate max region/area of 2d circles?

I have some 2d circles on a plane, each has its own minRadius and maxRadius. When two circles collides, both of them will shrink their radius, so the actual radius of a circle is in range [minRadius, ...
1
vote
3answers
924 views

How do I resolve a collision of a circle with two rectangle corners?

I'm writing a simple non-physical one-circle-to-many-rectangles collision detector/resolver. For collision detection, I'm using a very common algorithm, and it's working pretty well. For collision ...
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
1answer
545 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 ...
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 ...