Collision predition problem

Started by
2 comments, last by SFSpoto 4 years, 4 months ago

Hi all,

in the rigid body simulation I'm writing I'm using the Separating Axis Theorem to detect if two object overlaps in the next time step. I approximate the future object position using only the linear velocity. In this way I avoid to run the whole simulation. The aim is detect a collision just BEFORE it happens and NEVER allows objects to overlap.

Then I ran into the case reported in figure and I don't know how to handle it (I hope the image is clear).

The problem here is than there is no linear velocity component towards the object A.

For reference, I'm following Game Phisics by Heberly. I do not implemented any method to recovery from a situation when two objects already overlap, indeed in the book it is described as unnecessary due the collision are detected before they happen. Am I missing something ? Thank you

Advertisement

I solve this by each object having a move() function, which moves it to wherever it is set to move, checks for collision, moves it back if so (or leaves it if not). move() is involved in all translations or rotations of all objects, so it's pretty fail-proof.

I was considering something similar too, just I think is mandatory to step back the whole simulation (or at least the touching objects) otherwise is possible to run into some problems.

For example what if there are three object stacked, the top one pushes down the second that interpenetrates the bottom one. Now if you move the second object back it overlaps with the top, and the situation cloud become problematic.

Do you experiend these kind of problems with your solution or it works fine most (if not all) of the times ?

This topic is closed to new replies.

Advertisement