Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
0
votes
0answers
56 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, ...
1
vote
2answers
623 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 ...
1
vote
1answer
285 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
336 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
925 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
142 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
185 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
152 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
230 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
84 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 ...
5
votes
4answers
3k 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
318 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
310 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
136 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 ...
2
votes
1answer
958 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
58 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
263 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
308 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
85 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
61 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
392 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
119 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
153 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
105 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
377 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
410 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
41 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
563 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
62 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
507 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
165 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 ...
20
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
921 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
96 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
348 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
114 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
258 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
143 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 ...
0
votes
1answer
153 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
186 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 ...
5
votes
0answers
43 views

If collision move around the collider

I am writing a game in Java, I have this long method to move GameBodyObject towards the point: ...
1
vote
1answer
480 views

game physics: contact constraint and relative velocity

For two rigidbodies (2D boxes), A and B, I have been colliding A with B and finding the collision normal pointing towards A i.e. the direction that would separate A from B. When it comes to ...
0
votes
1answer
65 views

collisions: How to handle contact constraints for a rigidbody constrained to a line segment

I'm trying to come up with a strategy to handle a situation in 2D, where a rigidbody moves along a straight line segment, and can collide with other similar bodies and also static tiles. A naive ...
2
votes
1answer
91 views

How to detect and prevent the resolution of fake collisions?

I'm creating my own physics engine and I came across a small inconvenience. Here how it goes: when a body tries to push into something it really can't push, it gets pushed back (which is completly ...
2
votes
2answers
766 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
1answer
188 views

Polygon-Circle Collision Algorithm not working

EDIT: Updated code and video I've been working on one of the last pieces of my collision detection system for my game, a polygon-circle collision method. I'm almost there with it, but there's a few ...
4
votes
1answer
168 views

Issues with player movement and character interaction within Pygame

I am working on a small game that deals the main character, which is a cat, and dogs that chase it. The dogs are able to wander around like they are supposed to do, but the cat will only move a small ...
3
votes
1answer
393 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 ...
0
votes
1answer
54 views

How to stop player falling through blocks without bounce

So I have this game and I have applied gravity to it and when I load it up it just falls through the blocks and out of the screen. I have tried the bounce event but it just goes into an endless loop ...
2
votes
1answer
1k views

Pattern for collision handling?

I am writing a game with Java. There are many different kinds of entities on the screen, like the player, NPCs, monsters, bullets, items, shiftable blocks and so on. This question is not about ...

1
2
3 4 5
8