Questions tagged [separating-axis-theorem]
The Separating Axis Theorem (SAT) is used to detect if two convex, generic objects are colliding or not.
84
questions
1
vote
0
answers
32
views
Separating axis theorem implementation results in limitless extending colliders along the Z axis
I am trying to implement SAT and it works except for the fact that colliders extend infinitely along the Z axis and I can never get past them. I also have confirmed that ...
0
votes
0
answers
72
views
Seperating axis theorem is bugged
I am attempting to make split axis theorem for 2d collision physics. It does works, but is inaccurate. It is based off of: https://www.gamedev.net/tutorials/programming/math-and-physics/a-verlet-based-...
0
votes
1
answer
87
views
Trying to calculate hitbox vertices for my game and adding SAT collision
I am currently working on a basic HTML, CSS, and JavaScript game as a freshman high school summer project. I am currently trying to implement separating axis theorem (I spent a lot of time learning ...
1
vote
1
answer
246
views
Collision normal for sphere near edge of triangle face
When my sphere (or bottom part of a capsule) moves with its bottom near the edge of a mostly horizontal triangle (a face of a heightmap), I am sometimes getting very bad (mostly horizontal) normals. ...
0
votes
1
answer
80
views
How do I resolve a collision in SAT-3D when the projection axis is zero?
I am doing SAT in 3D, right now just between cuboids/3D rects (idk the terminology). I have intersection working fully, and static collision works as long as the projection axis is not zero. But if it ...
0
votes
1
answer
54
views
Help finding bug in seperating axis theroem code
My collision detection is inconsistent. I am testing between 2 rectangles. When they are un-rotated, it says they are intersecting way before they touch, but when I rotate one, it works properly. I do ...
2
votes
2
answers
182
views
SAT - penetration and pull out vector based on previous body position
I implemented SAT alghorithm that is able to detect collisions and return shortest "pull out" vector.
On the screenshot below this vector is determined by yellow color (P and Q).
If I add Q ...
0
votes
1
answer
148
views
Implementing Seperating Axis Theorem
I'm trying to implement the Seperating Axis Theorem by following this article I found on MDN.
Unfortunately, I'm not too geometry savvy and I wasn't able to find any good, simple implementation ...
0
votes
0
answers
416
views
C++ Help with Separating Axis Theorem
I am trying to detect collision between two triangles using Separating Axis Theorem however I am unaware what is wrong with my code. The CollisionHelper::isTriangleIntersectingTriangle is called every ...
0
votes
0
answers
68
views
Separating Axis Theorem Duplicate Axis
I am building a physics game engine from the ground up and currently stumped with my SAT implementation. The situation I am having is in regard to Edge cases, if I remove all parallel / duplicate Axis ...
1
vote
1
answer
411
views
SAT Collisions: Resolving rotations
Currently I have a working 2D SAT collision system with only boxes, but works with static rotations as well, leaving room for triangles. One of the issues I've been able to resolve was tunnelling, ...
0
votes
1
answer
55
views
Can I test for containment of convex polyhedra with the separating axis theorem?
I would like to refine the output of the separating axis test to not only tell me whether convex polyhedron A intersects convex polyhedron B, but also whether A is completely inside B. Is it safe to ...
0
votes
2
answers
614
views
Problem Implementing SAT Collision in 3D, OBB vs OBB
I am trying to implement SAT collision detection between 2 OBBs, however, I am getting a lot of false positives, can anyone help me figure out what I am doing wrong, thank you in advance.
This is my ...
3
votes
0
answers
628
views
OBB vs Frustrum collision detection
Some definitions:
An oriented bounding box (OBB) is a rectangular block which can be represented in many ways, as a collection of eight vertices, a collection of six planes or others, for this ...
1
vote
2
answers
459
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 ...
2
votes
0
answers
256
views
Getting false positives with SAT
I've been trying to get proper collision detection with SAT in 3D. I started of with this post: How many and which axes to use for 3D OBB collision with SAT.
I've been trying to get the right axis to ...
1
vote
2
answers
117
views
How do I test for collisions between two concave shapes decomposed into collections of convex polyhedra?
I am using convex decomposition with SAT (separating axis theorem) and I generate two arrays of convex pieces, How do I submit my arrays to my collision detection method which only takes two arguments....
5
votes
1
answer
563
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 ...
1
vote
1
answer
382
views
Separating Axis Theorem and rotated objects
Quick question which hopefully won't require thralling through my code.
I have a working implementation of SAT for 3D collision detection but I'm having some problems with dealing with rotated ...
0
votes
2
answers
859
views
Separating Axis Theorem is inconsistent
I recently implemented the SAT algorithm into my 2D game and at first it appeared to be working fine. However, when I move around and rotate the character in and out of the wall tiles, there are some ...
1
vote
1
answer
912
views
2D SAT Collision - Triangle and Square Problem
So I was just doing an example 2D SAT collision detection problem on paper when I encountered something unexpected. I ran the algorithm on a triangle and a square, and the result of the algorithm was ...
1
vote
0
answers
108
views
Seperating Axis Theorom For Collision Detection issues
I have been attempting to use the SAT test to determine whether two of my convex meshes are colliding, however I've encountered are rather strange issue. The algorithm does determine whether the ...
1
vote
1
answer
362
views
How to get a translation vector in a certain direction? SAT
I'm using the seperating axis thereom for discrete collision detection. I have code to find the minnimum translation vector (or distance) to seperate two shapes but how can I adjust it to get a vector ...
1
vote
0
answers
156
views
(Java2D) SAT Collision only works when shape is placed initially so it will collide
I'm working on a small 2D top down racing game and I'm trying to implement SAT collision into my game to detect collision between cars. So, I made a small little Java2D program to test the algorithm ...
5
votes
1
answer
792
views
Separating axes theorem problem
I´ve been following this tutorial : http://www.dyn4j.org/2010/01/sat/ to help me understand and implement the SAT for collision detection in my games as I want to add a support for polygons. However, ...
0
votes
0
answers
74
views
My collision detection code gives incorrect result
I am trying to use Separating Axis Theorem to check for collision between two shapes, but it's not working correctly. It's giving all incorrect results. The problem is in the collision-checking ...
1
vote
2
answers
907
views
How to resolve collision when both of the intersecting bodies were moving?
Suppose there are two quadrilaterals A and B. A is stationary but B is moving. They collided. Now B is inside A.
To check if they are intersecting I can use 2d separating axis theorem (SAT). To ...
2
votes
2
answers
2k
views
How to get the point of collision in Separating Axis Theorem?
I'm interested in the relatively precise point (not line) of collision for calculating angular velocity on impact for use in a impulse calculation. At first I thought, perhaps naively, that I could ...
3
votes
1
answer
765
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 ...
3
votes
2
answers
336
views
Zero vector test in projection intersection test in SAT
I stumbled across this implementation for a projection intersection test to use in a SAT test:
...
0
votes
1
answer
77
views
My polygons only register a collision if they are the same shape and directly over top of each other
I'm trying to learn about 2d polygon collision detection/handling and have ran into a snag.
After running through lots of tutorials and sample code I've attempted to implement my own polygon class ...
4
votes
1
answer
580
views
Separating Axis Theorem - Calculate Normals from Points in 3D
So while researching for a method to detect collisions in a 3D space between (arbitrary rotated) boxes, I stumbled upon this excellent question with great resources for my further research and great ...
1
vote
0
answers
1k
views
Calculating Minimum Translation Vector in Separating Axis Theorem based algorithm
In the 2D SAT collision determination algorithm, you project the convex polygons onto each potential separating axis. Supposing the polygons intersect, from what I understand, the axis for which the ...
4
votes
2
answers
2k
views
How to calculate faces involved in collision (Separating Axis Theorem)
I have a game engine created in javascript (https://jsfiddle.net/4gqsq8wf/) which uses collision detection via the Separating Axis Theorem. Currently, it does not have any means of resolving velocity ...
2
votes
0
answers
973
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 ...
0
votes
0
answers
43
views
How do I find at least the closest penetrating point with SAT? [duplicate]
For more accurate simulations, I want to find the closest point of another polygon to one polygon's center when they collide. Is this possible with the SAT algorithm? Is it a good strategy at all for ...
2
votes
0
answers
209
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
1
answer
436
views
Separation of axis theorem implementation at normals
This might be more of a math question, but it relates to the development of a simple physics engine I am trying to create.
I have been stumped on this for about a week now, and have been unable to ...
2
votes
1
answer
450
views
What are "supporting points" in the context of the SAT?
I am currently implementing a separating axis theorem collision response. It can be used by oriented bounding boxes and axis-aligned bounding boxes.
So far I have covered face-something contacts. I ...
0
votes
2
answers
550
views
Vertical Collision Detection, Falling Through Ground
After much work trying to learn collision system theory and apply it, I've got my collision system working for the most part. The player can collide horizontally with no issue, sliding against walls, ...
1
vote
2
answers
2k
views
Slopes vs. Rectangles: Different Collision Points
My platformer has both rectangular tiles and right-triangle slopes with rectangular hitboxes. My sprites are also rectangular.
Collision with only rectangular tiles works well. Even if there are ...
4
votes
1
answer
581
views
Calculating distance for Gauss Map optimized SAT
There's an optimization method for the separating axis test in 3D that uses Gauss Maps to discard certain redundant axes from the set of axes that need to be tested generated by edge-edge cross ...
2
votes
1
answer
299
views
Resolving penentration after collision using Separating Axis Thereom
I implemented collision detection in my game using SAT. The detection works, but I'm trying to use the algorithm to figure out the penetration vector of the two OBBs and push them apart (before doing ...
3
votes
2
answers
3k
views
Collision detection 3d rectangles using SAT
This question builds on a previous post asked by griffinHeart nov 2012. See link below.
How many and which axes to use for 3D OBB collision with SAT
Refering to the explanation/answer by Ken.
What ...
0
votes
1
answer
540
views
Separating axis Theorem rotation issue
I made a post yesterday to see if anyone could understand my problem.
However I did not receive much guidance, probably because my question was not clear.
I have worked on it a little more and ...
1
vote
0
answers
597
views
Separating Axis Theorem Issue
I am trying to create a 2d top down shooter using DirectX 11 (Windows 8 Store) and I am trying to implement OOBB collision using the Separating Axis Theorem.
However I appear to have run into an ...
1
vote
2
answers
853
views
SAT - How to find Shortest line between two static convex 2D Polygons?
RI have a pretty standard SAT algorithm that seems to successfully be detecting collisions but now I am looking for some assistance in finding the shortest line between 2 separated Polygons.
I ...
1
vote
2
answers
404
views
Collision detection circle-segment-segment
I've already implemented collision detection in my game loosely following this tutorial, which works great, but I realized there's one major flaw.
The player and the enemies are circles, while the ...
9
votes
1
answer
1k
views
Separating axis theorem with multiple polygons?
I am attempting to implement the separating axis theorem in C#. I have a function that can calculate the minimum translation vector between two polygons. However, I can't seem to create a function ...
2
votes
0
answers
98
views
Calculating contact points with SAT [duplicate]
After detecting a collision between two convex shapes by using separating axis theorem and calculating MTV. How can I calculate the contact points?(for applying torque to the rigid body).