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):
...
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 ...
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, ...
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 ...
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 ...
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 ...
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...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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 \$|\...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
separating-axis-theorem × 83collision-detection × 62
collision-resolution × 20
physics × 15
c++ × 11
2d × 11
mathematics × 8
c# × 6
3d × 6
javascript × 6
xna × 5
vector × 5
java × 4
game-mechanics × 3
aabb × 3
opengl × 2
movement × 2
geometry × 2
platformer × 2
rotation × 1
algorithm × 1
monogame × 1
raycasting × 1
actionscript-3 × 1
projection × 1