# Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

320 questions
Filter by
Sorted by
Tagged with
5k views

### Hexagon collision detection for fast moving objects?

A object has a position and a speed vector. Usually only the position is used to check if two objects collide, this is problematic for very fast moving objects as it can happen that the object moves ...
8k views

### How to deal with corner collisions in 2D?

I'm writing a top down 2d XNA game. Since its my first I'm trying to write the physics and collision stuff myself to learn it. Whenever my player sprite character attempts to move into a position ...
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 ...
11k views

### Collision resolution in case of collision with multiple objects

I have static objects and movable objects. The collisions are detected using the separating-axis-theorem. For example, in this situation I have two static objects (in red): and a movable object ...
3k views

### How do I calculate rotation caused by bounce friction?

Following on from my previous question: I have the ball quite realistically bouncing from surfaces it hits. Now I'd like to make it spin from the friction of the hit. Showing this is simple enough: I ...
9k views

### Resolving a collision with forces

In my 2D physics engine, I can detect AABB vs AABB collisions, and resolve them by finding the shortest penetration vector and adding it to the AABB's position. Doing this "pushes" the first AABB ...
3k views

### Storing coordinates of every object in server side in MMOs

In an MMORPG: Is it typical or feasible to store the coordinates of every tree, bush rock.. etc in the server side for collision detection? If so, what would be a feasible way to store such a huge ...
2k views

### Make the player run onto stairs smoothly

I have a 2D Platform game, where the player Always runs to the right, but the terrain isn't Always horizontal. Example: I implemented a bounding-box collision system that just checks for ...
6k views

### Microsoft XNA Platformer Example, is the Collsion Detection implemented accurately?

The example provided by Microsoft seems as if the collision detection (from what I can see) will have a small error. When the user collides with an Unpassable tile, the depth of the intersection is ...
1k views

### How to separate colliding objects without creating more collisions

Suppose I use a simple discrete collision detection system where I move all objects then check for collisions. I want any colliding objects to be separated (of course) and assigned appropriate ...
3k views

### Collision rectangle response

I'm having difficulties getting a moveable rectangle to collide with more than one rectangle. I'm using SFML and it has a handy function called intersects which ...
253 views

### Strategies for dealing with crowds at choke-points

I've recently switched my game engine over from steering behaviours to impulse based movement with proper time based collision resolution. This has solved so many problems (no more tunnelling, yay) ...
5k views

### How to resolve penetration of two colliding bodies

I've implemented simple 3D game physics engine. I already have decent collision detection in place, now I'm trying to figure out the collision response part. I'm using impulse based method to ...
2k views

### Reusable top-down collision class

I've recently picked up monogame and am working on a simple top down game to get me started and learn the basics. I've got the movement and the rotation to follow the mouse sorted out but I'm stuck ...
5k views

### 2D AABBs and resolving multiple collisions

Okay, so this is a problem I've been trying to figure out for quite some time. Mine is a 2D platformer game with a world made up of (usually) immobile tiles and mobile sprites, both of which use AABBs ...
360 views

### How do I prevent jitter amongst near-stationary physics objects?

I have been implementing a custom physics engine, and I'm pretty close to having it working as I would like it to. There is a gravitational force, collisions and collision response. Unfortunately, ...
916 views

### Collisions between players in multiplayer racing game

I'm creating a simple racing game (spaceships, no gravity) using p2.js, phaser and node.js. What I have done: Client receives world state from server: extrapolate other players based on latest ...
385 views

### Need efficient way to keep enemy from getting hit multiple times by same source

My game's a simple 2D one, but this probably applies to many types of scenarios. Suppose my player has a sword, or a gun that shoots a projectile that can pass through and hit multiple enemies. ...
3k views

### Collision Detection Game Design and Architecture

I've reading some articles about collision detection. My question here is about ideas on the design for it. Baically I have a C++ game that has a main loop with entities with an update method. Based ...
4k views

### How to implement friction in a physics engine based on “Advanced Character Physics”

I have implemented a physics engine based on the concepts in the classic text Advanced Character Physics by Thomas Jakobsen. Friction is only discussed very briefly in the article and Jakobsen himself ...
5k views

### How do I restrict the movement of a point to within a radius of another?

I have a situation where a sprite's center point needs to be constrained within a certain boundary in 2D space. The boundary is circular, so the sprite is constrained within a radius. This radius is ...
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 ...
4k views

### Circle-Rectangle collision in a tile map game

I am making a 2D tile map based putt-putt game. I have collision detection working between the ball and the walls of the map, although when the ball collides at the meeting point between 2 tiles I ...
8k views

### Implementing Separating Axis Theorem (SAT) and Minimum Translation Vector (MTV)

I was following codezealot's tutorial on SAT and MTV and trying to implement it myself but I've come a cropper when it comes to getting the correct MTV. Here is my example: (Cue pretty pictures...) I'...
2k views

### Handling collisions with ground

How do you usually solve collisions between entities and the ground? Sending collision events hardly seems appropriate since almost everything touches the ground at almost all points in time. Calling ...
722 views

### Collision Detection problems for vertically moving platforms

Background My game is a static screen (ie, no scrolling) 2d platformer and my CD routine is split into 2 - after vertical movements, (ie, gravity etc) I check for collisions, and if they are detected,...
513 views

### Calculating impulse propagation through a rigid body after a collision

I'm working on a game. I need to work out what the impulse is at different points on a body as a result of a collision. For example, in the following diagram, if there is a collision that results in ...
1k views

### Circle Collision Resolution and Angular Momentum

I have a 2D engine working pretty well that involves rectangles and circles. I just reworked parts of the collision detection/response system for better handling of angular speed/momentum. The ...
2k views

### When two moving objects collide, which one sends the message, and which one recieves it?

I am writing a platform game using an entity-component system. Entity-World collisions are robust and work very well, and I'm now working on collisions between entities. Just to be clear, in my code ...
2k views

### Meaning of offset in pygame Mask.overlap methods

I have a situation in which two rectangles collide, and I have to detect how much did they collide so I can redraw the objects in a way that they are only touching each other's edges. It's a ...
1k views

### Need some advice regarding collision detection with the sprite changing its width and height

So I'm messing around with collision detection in my tile-based game and everything works fine and dandy using this method. However, now I am trying to implement sprite sheets so my character can have ...
773 views

### Help me please to choose proper path-finding algorithm

I am new to game development and just want to ask for advice. I need to know which path-finding algoritm will be suitable for my scenario: Units - any shape. But in most cases rectangles of different ...
3k views

### How do I resolve a collision of a rectangle with two rectangular tiles at once?

I am having some problems with collision detection between a player and the environment in a tile-based game. I have a player objects, Tiles and what I call ...
9k views

### Ball collisions 'sticking' together

I have a program which simulates many bouncing balls. The balls can bounce off each other and off the sides of the container. The problem I am having is that sometimes when two balls collide, they ...
2k views

### How do I resolve a sphere-triangle collision in a given direction?

I am trying my hand at game physics. I understand that the basic way to pull back a sphere when it collided is to negate the penetration distance: ...
2k views

### How do I make a collision between AABBs slide?

I have a room with objects inside. Each object has it's own AABB. I know how to check for collisions between the objects with an AABB-AABB intersection. How do I calculate an appropriate collision ...
145 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 ...
363 views

### Creating an unbiased deterministic collision resolution order

I'm working on a game with a replay system, so I need the game logic to be deterministic. A part of this is collision detection and I'm having a bit of a conceptual problem here. (I'm programming in ...
5k views

### 2D Rectangle/Circle Continuous Collision Detection

I'm looking for a fast 2D continuous collision detection algorithm for circles and rotated rects. It needs to determine the time of collision. Both shapes may be moving at high speed, so the ...
444 views

### Move penetrating OBB out of another OBB to resolve collision

I'm working on collision resolution for my game. I just need a good way to get an object out of another object if it gets stuck. In this case a car. Here is a typical scenario. The red car is in ...
272 views

### Finding new position after collision with multiple colliders

What is the most accurate way to find the correct position to where a moving character should be re-positioned as a collision-resolution, after it has collided with multiple colliders? The figure ...
1k views

### How do I avoid 3D AABB collision response getting stuck at block edges?

I want the player to be able to slide along cubes, but without getting caught at the seam between 2 adjacent cubes. I've gotten it so that I can do x collision, with sliding, and y, and z, but I can'...
11k 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 ...
977 views

### Allowing a player to walk up and down slopes without resistance

I am trying to implement a platformer where both the player and the level are made up of arbitary polygons. One requirement is that the player can stand still on slopes, and walk up and down them ...
3k views

### Collision with tile corners/seams in 2D platformer

There seems to be a lot of somewhat related questions answered already, but none I read answered my exact problem. I have a 2D platformer whose world is made entirely out of tiles that are in a ...
592 views

### How do I avoid causing more collisions, when resolving multiple AABB collisions?

I have a lot of AABB bouncing on the screen. Doing collision/response between 2 AABB is fairly easy, but how do you handle this when you can be pulling AABB's apart but making them getting into ...
3k views

### How to handle the top of a slope in a 2D tile-based platformer?

I'm working on a 2D tile-based platformer that supports 45-degree slope tiles. There are several questions on the topic, but none seem to cover this precise problem that I have. This excellent ...
443 views

### XNA Collision is quircky/wobbly, how to improve?

I am sorry if this was already answered but I couldn't find the answer. So I am doing a tile based platformer and when I was making collision I had quiet a struggle I looked here and googled for ...