Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

4
votes
5answers
1k views

Lunar Lander calculating gravity, acceleration and collision in GameMaker

I've already asked this on the GameMaker forums but had no response so far. I'm making a little Lunar Lander game as my first foray in to GameMaker, I'm wanting to have the ship land and take off ...
0
votes
2answers
74 views

Collision stickyness problem on multiple inputs

I've been trying for a couple of days to solve an issue I'm having with top-down 2D collisions, whenever I collide with tiles that have adjacent collidable tiles my player sticks to the wall, If I ...
0
votes
2answers
249 views

Why is my collision code blocking the player's movement in XNA?

I have the following code to check for collisions in my game, but this code doesn't work it as should. For example: I go from up to down and if collision is detect I can't turn right; if I go from ...
-1
votes
2answers
356 views

My 2D collision code does not work as expected. How do I fix it?

I have a simple 2D game with a tile-based map. I am new to game development, I followed the LazyFoo tutorials on SDL. The tiles are in a bmp file, but each tile inside it corresponds to an internal ...
-5
votes
2answers
2k views

Unity Renderer.bounds issue?

I would like to make rend.bounds.max.y be always equal to 20 on collision no matter what, using the script below. But it seems that I can't set it manually and the script has no effect on my ...
3
votes
1answer
222 views

Rigid body falls through static mesh even though collision is detected

I'm using Jitter Physics to create a game. For testing, I have ball (a spherical rigid body) falling onto a small box-like mesh. The problem is that the ball falls straight through the floor, even ...
3
votes
1answer
100 views

How can I determine “exact moment” of collision with ray casting?

I'm currently brainstorming how the physics for my game engine is going to be handled. It's top down and I'm thinking of using ray casting for collision detection. I've reached two potential problems (...
2
votes
1answer
616 views

How to handle collision detection

So the way that I am doing the movement for my game is that you can left click a unit (which is just a rectangle object), and then it is selected. While it is selected, you can right click and that ...
2
votes
1answer
590 views

Collision in PyGame for spinning rectangular object.touching circles

I'm creating a variation of Pong. One of the differences is that I use a rectangular structure as the object which is being bounced around, and I use circles as paddles. So far, all the collision ...
1
vote
1answer
41 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
vote
1answer
655 views

Cocos2d - Physics bodies randomly loosing Velocity along an axis after impact

This just started occurring and seems to randomly happen during, and between, game sessions. A dynamic moving body collides with a static body and instead of bouncing off looses (almost completely) it'...
1
vote
1answer
1k views

Cocos2dx+Chipmunk: Fully elastic collision between moving bodies

I'm using Cocos2dx and the built in Chipmunk physics engine, and currently I've got my PhysicsBodys' materials set up with: Density=0 Restitution=1 Friction=0 in ...
0
votes
1answer
86 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 ...
0
votes
1answer
117 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 ...
0
votes
1answer
110 views

How to make top-down AABB collision response work properly in MonoGame?

I have a problem with top-down racing game I'm working on. I need to implement AABB collision with other cars and objects. But when going fast enough, the car can go through thin objects when hitting ...
-1
votes
1answer
52 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 ...
-2
votes
1answer
99 views

collision between two objects

to test collision i am using intersect function. if(this.getBounds_ball().intersects(this.getBounds_rect())) { but the problem is i dont know how to test where ...
4
votes
0answers
42 views

If collision move around the collider

I am writing a game in Java, I have this long method to move GameBodyObject towards the point: ...
3
votes
0answers
186 views

Is there an algorithm for collision resolution that factors in velocity?

I'm trying to program collision detection between moving convex polygons. To detect collisions, my program uses the GJK algorithm, and to resolve the collisions, it uses EPA. The problem with EPA is ...
2
votes
0answers
48 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: ...
2
votes
0answers
190 views

Game Physics: Calculating a collision response using the Separating Axis Theorem?

I am working on a project in which I have implemented the Separating Axis Theorem to detect collisions between objects. My current collision response is an object that contains whether it is ...
2
votes
0answers
737 views

Implementing Separating Axis Theorem to Detect and Handle Sliding Collisions

I am having a bit of difficulty detecting collisions properly with separating axis theorem. My code seems to be giving a lot of false alarms. Also, I've looked into implementing sliding collisions ...
2
votes
0answers
152 views

2D Polygon Collision push direction with large polygons

I have a collision detection/resolution implementation that uses the Separating Axis Theorem. Detection and such works perfectly fine, as well as resolution for most objects/shapes in my game. ...
2
votes
0answers
634 views

2D Distance Field as collision handler method

Pixeljunk Shooter has really cool fluid simulation. I found the dev's video explaining what they did. Here I understand that it is particle based simulation Smoothed Particle Hydrodynamic I can ...
1
vote
0answers
26 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 ...
1
vote
0answers
36 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 ...
1
vote
0answers
51 views

High level overview when handling collision detection (or resolution) with overlapping when already touching

I'm looking for some advice on handling collision detection when you've already collided (at a high level). Suppose we're using 32-bit floating points, but with the constraint that the entire level ...
1
vote
0answers
211 views

Resolving collision with multiple objects

I already have SAT implemented for collision detection and MTV computation and it works totally fine when my character collides with only one object. But it's possible that there is a collision with ...
1
vote
0answers
38 views

Weird issue in collision resolution of non-static bodies

I'm a bit of a beginner in engine development, so I decided to write my own engine from scratch so I could learn more about what happens under everything. I've been progressing fairly well, except ...
1
vote
0answers
362 views

2D physics engine: Impulse based collision response with contact point manifold

I'm implementing a 2D physics engine where collision response is based on impulse computation. I'm going to first expose the context, then the problem, and finally the questions. Context Simple ...
1
vote
0answers
166 views

Stuck at tile seams using 2D collision

I'm making a little top down 2D dungeon crawler, and have pretty much fallen over at collision detection with my dungeon walls. I have figured out how to stop my player sprite at the walls, but I'm ...
1
vote
0answers
103 views

SAT collision detection and stacking objects

I'm working on a small game for Android which deals with some simple physics, including the need to stack objects on top of one another without jitter. This infamous "stacking collisions" issue with ...
1
vote
0answers
30 views

Defining collision rules in Farseer XNA

I'm trying to integrate Farseer into my XNA game. Since I'm using an EntityComponentSystem approach, I've added the Body inside a component and added it to the players' components. One thing I'm ...
1
vote
0answers
370 views

How to resolve multiple simultaneous ball collisions in a pool game?

I'm trying to simulate a break shot in billiards (1 ball hits a pyramid of 15 balls). The formula for 2D ball collision works correctly in my game. But when it is applied to the break-shot, the result ...
1
vote
0answers
261 views

Handle floating point precision errors in collision detection and resolution

I am experimenting with a continuous collision detection and response of points on a tile map. This are my results for now: I did this by shooting a ray (red line) from the current position (red ...
1
vote
0answers
57 views

Detecting the two Vector3 that determine the bottom-edge of the side of a box-collider that had collision (with C#)

So, I understand that plenty of questions have been posted on how to detect which side of a Box Collider had collision. However, what I am trying to achieve is a little different. I want to find out, ...
1
vote
0answers
203 views

Collision detection for multiplayer game with MatterJS

We are developing JavaScript multiplayer top down game where characters can move freely and collide with each other. We are rather weak at mathematics and physics, luckily we don't need much, just ...
1
vote
0answers
62 views

Manual response when 2 shapes made of rectangular volumes collide

I have 2 compound objects made of rectangular blocks. One of them (the one that is moving) has a script that listens to OnTrigger callbacks. What I need is to position the moving compound object on ...
1
vote
0answers
335 views

How can I find the collision response between a moving sphere and cube?

I'm implementing my own algorithm for sphere and cube collision response. So far I'm able to only test if both of them overlap. My problem is: A cube is rotating around its axes i.e x and z axes. And ...
0
votes
0answers
39 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, ...
0
votes
0answers
17 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 ...
0
votes
0answers
38 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
0answers
33 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
0answers
29 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 ...
0
votes
0answers
100 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 ...
0
votes
0answers
305 views

3D Coulomb Friction - Use Collision Impulse To Calculate Friction Force?

I've been using this document to learn how to implement a very basic physics engine. The section on Coulomb Friction on page 55-56 (marked as pages 43-44) confuses me. It observes that the friction ...
0
votes
0answers
170 views

Circle velocities stay the same after elastic 2D collision

I am following this paper in trying to create elastic 2D collisions among two circles. The problem is that my end velocities are the same as my start velocities. I've looked over my code and don't see ...
0
votes
0answers
358 views

My sprites do not always respect collisions in Pygame

I have a Player sprite (40x40 pixels) and Tiles (20x20 pixels) which build the terrain. At the 4 edges there are 2 rows or columns (depends on vertical or horizontal) of wall tiles. Those are the ...
0
votes
0answers
2k views

Alternative to unity's character controller

I wonder what you guy would do for a cheap replacement of character controller in unity. I try a bunch of implementation and they don't work at all, what I'm doing wrong? I'm trying to make a game ...