We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
0
votes
0answers
21 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
2answers
45 views

Way to Reset Varible After Collision Resolution - Gamemaker

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 ...
-1
votes
0answers
40 views

2D collision response for any object

I'm using SFML to write a basic 2D physics simulation. I've already written the movement and rotation as well as collision detection algorithms. But I need some help with parts of the collision code. ...
0
votes
1answer
20 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 ...
0
votes
0answers
24 views

Numerical errors in Player collision offset causing player to fall through the ground the next frame, how to avoid?

I'm trying to implement player physics with arbitrary objects, in this case, a bunch of cubes. I wanted to add a "floor" so in my cube collision function, I added the following following lines: <...
1
vote
2answers
72 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
93 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
0answers
19 views

Moving point (as line)-Polygon collision detection

i've reached a good point with my engine, with static/instant collision detection and callbacks in case of collision. By instant collision detection i mean: Object A moves from x1y1 to x2y2 Check if ...
0
votes
0answers
18 views

Stop the player to prevent it from being thrown away after collision

I'm trying to write a script where when the player (kinematic) comes up against an enemy he stops, jumps and gets dynamic again. The problem is that when it returns dynamic it is thrown away and does ...
0
votes
0answers
78 views

What is wrong with my collision detection?

I am trying to create a collision detection system between block using this code: ...
0
votes
1answer
106 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
144 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
0answers
25 views

Unity Tilemap collider stopping player's movement [duplicate]

I am using tilemap collider to create collision between my world tilemap and the player, but sometimes when the player runs on the tilemap, it stops the player's movement and kind of makes it look ...
0
votes
1answer
55 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
27 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
157 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 ...
0
votes
0answers
9 views

Physics Collision Resolving with Estimated Rotation

So I have a Sphere that I want to simulate simple estimated physics on it. I substepping with trace to find collisions, once I have the collision I can query Collision Location and Tangent - based on ...
3
votes
1answer
203 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
40 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
43 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
50 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
59 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
70 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
50 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?...
0
votes
0answers
26 views

How to check if moving OOB will resolve the collision?

I now (thanks to several questions that were already asked here) that I can use SAT to check if two OOB are intersecting or not. But what if they are already intersecting? My situation is: I have two ...
2
votes
1answer
84 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
28 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
45 views

2D AABB Swept Collision Algorithm Premature Collision

I've been following this pseudo code for my implementation of 2D AABB Swept Collision: ...
0
votes
0answers
24 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
141 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
51 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
votes
1answer
58 views

How can I prevent the balls from overlapping?

I am making a ball rolling game controlled by tilting an accelerometer. In my game multiple balls overlap, so they end up showing as only one ball. How can I solve this problem, so balls do not ...
0
votes
0answers
36 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, ...
0
votes
2answers
316 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 ...
0
votes
0answers
31 views

How to fix 3D AABB Collision not working on corners?

I'm currently working on a minecraft clone and right now trying to implement player to terrain collision. My approach is to get the blocks which the player might collide with through the collision box ...
1
vote
1answer
173 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
191 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
480 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
130 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
142 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
120 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
151 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
74 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 ...
2
votes
4answers
2k 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
238 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
206 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
106 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 ...
1
vote
1answer
734 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
52 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
175 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 ...