Skip to main content
5 votes

How many and which axes to use for 3D OBB collision with SAT

working c# example based on Acegikmo's answer (using some unity api's): ...
Bas Smit's user avatar
  • 151
5 votes
Accepted

Calculate bounce and friction after a projection-based collision

The "velocity vector" is the difference between the velocities of the two objects. When colliding with a static (unmoving) object (such as the level), the "velocity vector" is indeed its current ...
Jibb Smart's user avatar
  • 2,470
3 votes

Separating Axis Theorem and rotated objects

The key to any optimisation, is identifying where the bulk of the work is being done. A simple analysis of your problem reveals the following: A cuboid shape has 8 vertices, three perpendicular axes, ...
Ian Young's user avatar
  • 2,694
3 votes

Separating Axis Theorem is inconsistent

I am happy to say that I have squashed the bug. The visualisations really aided me and I strongly recommend anybody struggling with anything to try and get whatever it is your working on onto the ...
Darcy's user avatar
  • 81
2 votes

SAT - penetration and pull out vector based on previous body position

I think I found an answer for my question by using SAT algorithm only. Of course I'm completely ignoring tunneling effects. Let's say we have shapes A and B. Shape B penetrated shape A. We know old ...
Rakoo's user avatar
  • 141
2 votes

Collision detection 3d rectangles using SAT

Quoting the answer to the linked question, the axes you need to test are: 3 axes from object A (face normals) 3 axes from object B (face normals) 9 axes from all the pairs of edges of A and edges of ...
DMGregory's user avatar
  • 141k
1 vote
Accepted

Trying to calculate hitbox vertices for my game and adding SAT collision

After reading the code and guesswork, I've landed in that you have a rectangle defined by: A center point given by oneX and oneY...
Theraot's user avatar
  • 28.2k
1 vote

How do I resolve a collision in SAT-3D when the projection axis is zero?

For anyone who might be facing a similar issue, I found the solution. As you may know we are suppose to disregard any axis which are (0,0,0) (cross product of edges from two shapes is 0), because we ...
Tree3708's user avatar
1 vote

SAT - penetration and pull out vector based on previous body position

Likely not as elegant as you're hoping for, unfortunately. SAT is primarily for collision detection between two convex shapes, not collision response. So you're already down a bit of a rabbit-hole. ...
Robert French's user avatar
1 vote

Implementing Seperating Axis Theorem

Did I implement the various formulas correctly? No. A normal should be a single direction vector with one x value and one y value, not a line segment joining two points. Point projection where you ...
DMGregory's user avatar
  • 141k
1 vote

SAT Collisions: Resolving rotations

I am not sure how you can use SAT to resolve continuous rotations but I know of two other algorithms that may do the trick, however they are made for convex shapes. The first one is conservative ...
Le Grand Spectacle's user avatar
1 vote

How to use separating axis theorem to allow for sliding along walls

Is a top down or a platformer 2D game? Assuming it's a top down, what you want to do is to compare the movement amount vector to the normal of the wall that you've hit. Your two most extreme cases ...
mt_'s user avatar
  • 586
1 vote

How to use separating axis theorem to allow for sliding along walls

Separating axis doesn't mean you have to split along x and y. You can pick other bases. Make the axes the normal perpendicular to the wall and the tangent along the wall. Then you can set the speed ...
ratchet freak's user avatar
1 vote

Separating Axis Theorem is inconsistent

Your projection is incorrect. Instead of $$projected = \vec a \cdot \vec b$$ (Where \$\cdot\$ means dot product) you need to use $$projected = \vec a \cdot \frac{\vec b}{|\vec b|}$$ (Where \$|\...
Bálint's user avatar
  • 15.1k
1 vote
Accepted

2D SAT Collision - Triangle and Square Problem

Figured it out thanks to @DMGregory 's comment. The slanted axis in the picture shouldn't be there. The axes should be parallel to the normal of each side of both shapes, not perpendicular. This idea ...
Ibrahim's user avatar
  • 196
1 vote

How to get the point of collision in Separating Axis Theorem?

The axis with the smallest overlap is not necessarily a good guide to where the collision occurred. Imagine a small cube translating to the right at high speed, entering a larger prism from the side ...
DMGregory's user avatar
  • 141k
1 vote

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

I will assume this question is about 3D SAT which I find has alot less resources than 2D.. I have been struggling with this for the past week. I have face contacts down but not Edge cases. When you ...
WholesomePorridge's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible