Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Proper sphere to triangle collision resolution

I am working on a 3D game. For simplicity sake, the player is currently represented as a sphere. I have implemented an intersection test between a sphere and triangle, which returns a packet ...
2
votes
1answer
22 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}(...
0
votes
1answer
24 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 ...
0
votes
1answer
80 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 ...
0
votes
0answers
26 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 ...
0
votes
0answers
25 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 ...
0
votes
0answers
34 views

Regarding static collision resolution between two circles

I have some code that resolves the positions of two circles when they collide: ...
0
votes
1answer
49 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 ...
0
votes
0answers
69 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 ...
0
votes
0answers
37 views

Issue with 2d Angular Car Collision Response

I am having trouble getting the angular collision response to work properly in my 2d car simulation. I have gotten the linear collision response to work between the vehicles, however, the angular ...
0
votes
1answer
124 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 ...
0
votes
0answers
12 views

Correct way to compute separation velocity from impact velocity, normal, friction and resitution?

I am creating a simulation of rigid bodies in 2D space. My collision detection returns: normal - The normal vector of the collision (e.g. ...
0
votes
1answer
34 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 ...
0
votes
0answers
49 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 ...
1
vote
0answers
45 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 ...
0
votes
0answers
36 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 ...
3
votes
2answers
266 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://...
0
votes
0answers
27 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 ...
0
votes
0answers
18 views

What is the correct formula for penalty forces?

I am trying to add penalty forces between two hard body objects, so when they collide they move in a realistic way. What I have so far is this: ...
5
votes
1answer
76 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. ...
1
vote
0answers
108 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 ...
0
votes
1answer
268 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 ...
0
votes
2answers
104 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 ...
0
votes
1answer
311 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,...
0
votes
0answers
37 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 ...
1
vote
1answer
67 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, ...
0
votes
1answer
188 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: ...
0
votes
1answer
48 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: ...
0
votes
1answer
49 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. ...
0
votes
1answer
151 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 ...
1
vote
1answer
43 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 ...
1
vote
2answers
63 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 ...
0
votes
0answers
80 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, ...
0
votes
0answers
28 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 ...
1
vote
1answer
61 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 ...
1
vote
1answer
113 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: ...
0
votes
1answer
51 views

Way to Reset Varible After Collision Resolution

I have some code that, if a player is in contact with the wall, prevents the player from moving. Is there any way with this code to reset the collide variable, and if not, what would be the simplest ...
0
votes
1answer
47 views

Way to Get Collision Box Width Gamemaker

I was coding the wall collision system for my game, and I wanted to do it using intersect boundaries instead of checking every step if they are off the screen. When the player crosses the boundary ...
1
vote
2answers
137 views

2D game with collision detection, and I need help with how to resolve a collision

At the moment I have built a custom Vector2 class and have a character object that has an acceleration vector (modified by vector forces), a velocity, and a position as well as bounding boxes for ...
1
vote
2answers
128 views

How To Resolve Collision Before it Occurs

I have 2 objects, A and B, in a 2 dimensional space. If I know A is trying to move by vector M (that is to add vector M to the positional vector of A), and that A will collide with B after A moves, ...
0
votes
1answer
210 views

What to do with collision detection?

I am able to get collision detection (CD) into my game but... what do I do with it? Do I push the player back to the last location? Something else? I am programming the game in C++ using the Irrlicht ...
0
votes
2answers
1k views

Dragging a Rigidbody2D without passing through obstacles

I have this body of code written for an object that needs to be an obstacle and another object that is draggable. I have colliders on both and a kinematic rigidbody on the draggable object, but the ...
0
votes
1answer
89 views

Collision detection and solution causes teleportation on corners

I am making my own game engine on Python and I got stuck with collision between objects. ...
1
vote
0answers
30 views

Polygon doesn't bounce enough in edge-ground collisions (but it does in vertex-ground collisions)

I'm currently making a (basic) physics engine in Python in which I want a polygon to bounce off the ground (\$y=0\$). When a vertex hits the ground, I apply the (linear) impulse $$\overrightarrow{P}...
0
votes
1answer
715 views

How to make a ball move with constant velocity after a collision?

In my scene there is a player and a ball a few units above the ground. The ball has a rigidbody2D attached with zero gravity. I built a "cage" with square sprites to simulate the edges. I would like ...
4
votes
1answer
406 views

How do I apply angular velocity vector after a collision?

I'm writing a small 3D physics engine, and I am trying to get the angular velocity vector of two shapes, specifically two cubes. For deeper understanding I have divide the motion to linear and ...
0
votes
1answer
89 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
44 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
85 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
131 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
2 3 4 5
8