2022 Developer Survey is open! Take survey.

Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
1 vote
1 answer
83 views

Find closest open space in grid of rectangles?

I'm making a builder game where you snap arbitrarily sized rectangles into a 2D grid. I want the player to be able to drag and drop these rectangles anywhere on the grid, but prevent collisions (i.e., ...
user avatar
  • 13
1 vote
0 answers
30 views

Wall sliding collision resolution with multiple objects

TLDR My collision resolution algorithm with wall sliding works perfect for multiple walls but it fails when the angle of the corner of two walls is less than 90 degrees. (acute angles) and the player ...
user avatar
  • 115
0 votes
2 answers
72 views

How to reconcile collision detection with delta time?

In my simulation, if an object is inside another object, it imparts a force proportional to the distance inside the object (basically a separation force). I am having an issue though where the ...
user avatar
1 vote
0 answers
55 views

2D tilebased collision system

Hi i want to implement a collision system (something comparable to super mario) I would like it to have objects which can have any size (the hitbox of it) And it should be reasonably efficient (so ...
user avatar
  • 11
0 votes
1 answer
19 views

Box2D & Processing - Collision location randomly assigned to center point

I am working on a particle simulation using Box2D with Processing. The setup: I generate 4 kinds of particles that exist in equal amounts (for instance 200 in total, 50 each). They are (for now) ...
user avatar
  • 11
1 vote
1 answer
74 views

How can I improve collision padding against level geometry in my 2D game?

I'm scripting my own collision logic for a 2D game that works like this: Boxcast in the direction of movement against appropriate colliders in the scene If a ...
user avatar
0 votes
0 answers
22 views

Javascript Game Collision Shaking

I have a problem with collision shaking. The problem doesn't come from the collision, but from client side (sometime the it's smooth and sometimes not). Here is a video to show it : https://www....
user avatar
1 vote
2 answers
144 views

Voxel terrain vs AABB collision detection

I am trying to implement collision detection in a voxel game. Currently I check the side of the collision by finding the closest side and checking whether there isn't a solid block next to that side. ...
user avatar
0 votes
0 answers
35 views

Weird Collision Response occurring between 2 objects

I have been trying to program collision response between two objects (with AABBs) and the response is not what I except. Instead of bouncing off (reflective to the collision normal) each other the ...
user avatar
0 votes
1 answer
73 views

Problems with collision order of resolution

I have two objects, A and B, and I need help to solve the following problem about the collision resolution order: A and B are moving with the same speed, and they don't move both at the same time A ...
user avatar
0 votes
0 answers
16 views

Disk-line segment collision detection vulnerable to clipping through small angles

I've implemented a simple disk-line segment collision detection and response algorithm. It's not swept, so if going fast enough it can clip, and fact that the collision detection occurs "after&...
user avatar
0 votes
0 answers
43 views

How can i fix my enemy movement, and collision?

I recently started a project with some friends, Its a simple java game and im having issue getting the Collision and enemy movement working properly. Using this: ...
user avatar
  • 1
0 votes
2 answers
109 views

Rectangle collision not working!

I'm making a simple game in C# and i'm having some problems with rectangle collisions. What i'm doing is checking if two rectangles intersects, checking the side of collision and then moving the ...
user avatar
  • 51
0 votes
1 answer
112 views

Collision Resolution for Height Maps

GameDev StackExchange! I've written height map collision detection into my game, but I've been struggling on how to get the resolution step to work well with player movement. (This is in 3D, by the ...
user avatar
0 votes
0 answers
69 views

How do I expand my simplex in Expanding Polytope Algorithm (EPA) when the origin lies on it?

I'm doing GJK + EPA in 2D for collision detection + resolution. For GJK, I was using the vector (1,0) as my first support direction. However, if the origin happens to fall exactly on the simplex line (...
user avatar
  • 123
0 votes
1 answer
46 views

Surface-Sphere collision response

I'm making basketball throwing simulator and I have two questions about the collision response. To make collision response with any surface like the wall or ground, I'm using the following formulas to ...
user avatar
  • 1
1 vote
0 answers
50 views

What is wrong with my collision resolution function?

I have been able to implement the following linear collision resolution function, based on these tutorials, for a given pair of in-game objects that gives good results: ...
user avatar
-1 votes
1 answer
51 views

How to stop player from slingshotting across my game window

In my pygame dungeon rpg when my player collides with a wall at the top or the bottom of its rect and I move the player in either x-direction, the player gets slingshotted off the screen. Using print ...
user avatar
2 votes
1 answer
64 views

How do I calculate impulse when an object collides with plane(fixed object)?

I've been developing simple 3D impulse-based physics engine. I calculate impulse as follows: $$j_r = \frac{-1(1+e)v_r\cdot\hat n} {m_1^{-1}+\bbox[yellow,5px,border:2px solid red]{m_2^{-1}}+(I_1^{-1}(...
user avatar
  • 31
0 votes
1 answer
153 views

How to stop Players and Enemies from pushing each other

I am developing 2D Top-Down RPG game. I have script that makes my enemy follow the player, and when they touch the player, the player will start to lose HP. Everything works well, but when they touch ...
user avatar
0 votes
1 answer
963 views

In collision detection/resolution, what is a "collide and slide" algorithm?

Can anyone help me to better understand the concepts behind this algorithm? I've seen this phrase come up several times during my research into creating a 3D character controller, but am having issues ...
user avatar
0 votes
0 answers
37 views

3D collision response advice for complex meshes

I am trying to use my own collision detection system in Unity to speed up my game. My problem is that when rigid bodies sit on top of static bodies, they will balance unrealistically on one edge or a ...
user avatar
0 votes
0 answers
36 views

Character controller collision edge cases

Im trying to implement a basic 3d character controller. The way i currently do collision is; i check wether or not the character is inside any geometry before movement. If this is the case, i find the ...
user avatar
0 votes
0 answers
44 views

Regarding static collision resolution between two circles

I have some code that resolves the positions of two circles when they collide: ...
user avatar
  • 123
0 votes
1 answer
295 views

Swept AABB: finding collision normal in 3D?

I was following this tutorial which explains how to detect and resolve a 2d swept aabb collisions. I got the detection part working on 3d, but know I need a way to properly make a response, like ...
user avatar
0 votes
0 answers
202 views

How to Implement One-Way Slopes?

I am working on a 2D platformer in Unity and am doing my own collision detection. I was previously using the method described in Sebastian Lague's popular YouTube tutorial, where you break your ...
user avatar
  • 1,297
0 votes
1 answer
652 views

Swept 3d capsule intersection with AABB, what am I actually supposed to use to accomplish this?

I'm trying to figure out how to do continuous collision with a capsule (which would represent a collision volume for a player for example). Given how common the capsule is in many game engines, and ...
user avatar
  • 1,673
0 votes
1 answer
57 views

OBB vs rectangle/quad/plane with bounds collision detection/response

I am able to resolve collision between an OBB and a plane but can't get it to work when I introduce some bounds on the plane size. I want to have the plane of width ...
user avatar
0 votes
0 answers
87 views

How to do collision resolution with 2d rectangles?

I am trying to create a basic side scroll 2D game. There are lots of documentation on collision detection but I find the easiest to use at the moment is just basic AABB Collision. This is my basic ...
user avatar
1 vote
0 answers
79 views

Proper sphere collision resolution?

I am implementing a sphere to sphere collision resolution and I am a little confused on where to start. First question, is there a standard way that games/engines do sphere to sphere collision ...
user avatar
0 votes
0 answers
67 views

How to implement joints in and impulse based engine

I have been writing a 2D physics engine (for fun and learning) for a while now. I have managed to implement collision detection along with collisions responses with angular impulse and frictional ...
user avatar
3 votes
2 answers
947 views

Swept AABB Collision Detection Conflict with Tile-sized Gaps

Background The sweeping method for detecting and resolving collision has proven to be very versatile to implement collision for our game, and I have this GameDev.net article to thank for that: https://...
user avatar
0 votes
0 answers
64 views

Algorithm for simulating collision between circles of different mass

First of all, I'm not sure if this is the right site for this question, as it's actually a game I'm developing. However, I thought that this would be a common thing to need to know in games, so I put ...
user avatar
5 votes
1 answer
99 views

2D Platformer Multiple Body Collision Response

I've been stuck for the past few days on implementing multiple body collision response, and I can't seem to find any good resource to help me advance. Colliding between two objects is simple enough. ...
user avatar
  • 71
1 vote
0 answers
370 views

Simple collision resolution in a platformer game

I want to make a 2d platformer with moving, jumping and wall sliding. How can I make a simple pleasant collision resolution system that works for the following rectangles. Player is red, platform is ...
user avatar
  • 217
0 votes
1 answer
600 views

Godot: How do I create a temporary invincible state or invincibility frames?

My issue I have been racking my head around how to achieve invincibility frames. Working in the Godot Engine I have considered a few methods for this: Setting a Timer Node when damaged to trigger the ...
user avatar
0 votes
2 answers
121 views

How to make planets "stay together" on collision

I working on a 2D planetary orbit simulator and I've encountered a problem regarding the collision of planets. Currently, here is what I have ...
user avatar
  • 123
0 votes
1 answer
659 views

How to improve the charactercontroller for jumping?

I have an issue with my character controller, when I jump, it sometimes lands on surfaces it shouldn't be able to land on, like very steep slopes etc (even though my max slope is 45 deg). In this case,...
user avatar
  • 448
0 votes
0 answers
83 views

Pygame Collision | Why do I slide up walls in my tile based game?

My player if in contact with a wall either left/right/top(head) they will be able to just continue in the Y direction if you press jump as if you were flying. This is for all walls and invisible walls ...
user avatar
1 vote
1 answer
168 views

SAT Collisions: Resolving rotations

Currently I have a working 2D SAT collision system with only boxes, but works with static rotations as well, leaving room for triangles. One of the issues I've been able to resolve was tunnelling, ...
user avatar
0 votes
1 answer
512 views

Super mario bros "rounded" tile collision detection

I'm working on a Mario bros clone with SDL and C++ (purely for educational porpuses / and for fun) I got collision detection working by using AABB collision detection and resolving one axis at a time: ...
user avatar
  • 101
0 votes
1 answer
79 views

Speed after an angled collision?

I can calculate the speed when there is no angle, but I can't calculate the speed when it is angle. Physics paramaters: ...
user avatar
1 vote
1 answer
77 views

How to move player out of multiple penetrating colliders?

The player in my game can teleport like Noctis from ffxv.The player shots a weapon projectile and then teleports to the projectile. I'm using raycast to calculate the weapon position after thrown. ...
user avatar
0 votes
1 answer
289 views

Topdown Game Collision Detection

I am working on a simple game with topdown movement, but I am unable to get the collisions to work properly. I know the collision detection itself works, but the constraining of the player is where I ...
user avatar
1 vote
1 answer
103 views

Implementing a movement and collision system with Vectors and Area

I've scoured gamedev for around 45 minutes, but I'm unable to find a detailed approach to implementing a movement and collision system for games - specifically, when to use which process, and what to ...
user avatar
  • 111
1 vote
2 answers
72 views

Box collisions between vehicles in traffic pattern

I'm working on a traffic simulator. Right now, I have ways to manage 4-way stop intersections and a solution for efficiently determining which vehicles are colliding with one another. All vehicles ...
user avatar
0 votes
0 answers
115 views

Pong paddle and deflection angles

I'm trying to make a pong clone and am having trouble grasping ball deflection. The way I'm approaching it is to increase the angle by how far the ball collides from the middle of the paddle. However, ...
user avatar
  • 123
0 votes
0 answers
40 views

Pushing an object on other colliders makes the pusher object go through

The Wall moves to the right and pushes the Character with it. The character travels along a bunch of Blocks with colliders attached to them. This is the result: At some point, the Character gets ...
user avatar
1 vote
1 answer
84 views

2D Collision detection: rewinding to moment of first intersection

I am working on a collision system in a Platformer tile-based game. All tiles are AABB. I am trying to implement "Rewind to Moment of First Intersection" mentioned in this post's second point. The ...
user avatar
  • 540
1 vote
1 answer
209 views

Problem with diagonal collision response using PyGame

So I have been having this problem for the last few days and it has me really frustrated. What I am trying to do is resolve collisions with custom hitboxes in PyGame and it looks something like this: ...
user avatar
  • 21

1
2 3 4 5
8