Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
0
votes
0answers
38 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
37 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
22 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
160 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
20 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
63 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
54 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
118 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
74 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
78 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
27 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
50 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
100 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
36 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
42 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
0answers
91 views

OnActorHit not calling hit function in Unreal Engine

I am trying to make a pong game in a 3D landscape. I want to make the ball bounce around the box or the Pong pad. But the ball just goes through the walls and pad, but the pad collides with the walls. ...
0
votes
0answers
24 views

How can I prevent two rectangles from overlapping?

I have two rectangles defined by their respective left, right, top and bottom. I'm trying to prevent the collisions for these two rectangles but I cannot find a working solution. I am obtaining the ...
0
votes
1answer
101 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 ...
0
votes
0answers
75 views

Help with Minecraft-like AABB-AABB collision detection and resolution

I am currently working on a Minecraft like game with OpenGL and C++. I've gotten as far as abstracting a Camera object and setting up movement and even defining basic gravity like simulations, but I ...
1
vote
1answer
36 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
1answer
51 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
64 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
26 views

Calculate Collison Point (approximation) between two oriented bounding boxes [duplicate]

I implemented the separating axis theorem to detect collisions between two oriented bounding boxes (which is working fine). To do the collision handling, I am required to calculate the collision ...
0
votes
0answers
25 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
55 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 ...
0
votes
0answers
57 views

High speed collision detection using separating axis theorem

I’m using the SAT and the minimum translation vector from it to detect and handle collision in my 2D game. It works great for regular speeds, (i.e. when the speed is low enough so that an object doesn’...
1
vote
1answer
74 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
0answers
48 views

RigidBody Collision Handling with Verlet Integration

Hi I'm reading the Jakobsen Paper "Advanced Character Physics" which explains how the verlet integration along with a tetrahedron (4 particles) can form a structure usable for rigidbody (with 6 length ...
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
31 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
102 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
118 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
151 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
752 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
85 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
28 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
465 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 ...
3
votes
1answer
338 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
64 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
75 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
105 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
98 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 ...
0
votes
1answer
56 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?...
2
votes
1answer
148 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 ...
1
vote
0answers
39 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
0answers
27 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: ...
0
votes
2answers
336 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 ...
1
vote
1answer
67 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 ...

1
2 3 4 5
8