33 questions
1
vote
0
answers
30
views
Why does my Separating Axis Theorem fail near world axes? Unity
Problem Description:
I am implementing collision detection between an OBB and an AABB using the Separating Axis Theorem (SAT) in Unity. The algorithm works perfectly in most cases, but I have noticed ...
0
votes
0
answers
158
views
Polygon to Sphere using the SAT algorithm
I have been trying to get Sphere to Polygon collision to work for a long time now but I am having problems with the edge cases.
In 2D the axis for the edge detection that you use for the projection ...
0
votes
0
answers
401
views
Separating Axis Theorem: how to handle the rectangles overlapping stuck
I have implemented a Separated Axis Theorem to manage translating and spinning rectangles collisions detection and response (the physics of the response might not be very accurate but nevermind, I'm ...
1
vote
1
answer
357
views
Triangle to AABB collision code not working
I have been tweaking and reworking my code to test an AABB against a triangle and I am unsure what I am doing wrong. I am using separating axis theorem as I believe this is the best and only way used ...
0
votes
1
answer
184
views
Fast ways to filter out a list of triangles before performing SAT test against AABB
I'm trying to perform an AABB-tringle intersection with the triangles coming from a tria mesh and the AABB being the individual cells from a structured 3D grid/Voxel. Are there any smart ways/ ...
9
votes
4
answers
3k
views
SAT Polygon Circle Collision - resolve the intersection in the direction of velocity & determine side of collision
Summary
This question is in JavaScript, but an answer in any language, pseudo-code, or just the maths would be great!
I have been trying to implement the Separating-Axis-Theorem to accomplish the ...
1
vote
1
answer
2k
views
How get a collision point with SAT
I have implemented SAT collision detection system in 2D , but I don't get how get a collision impact point.
For the moment I obtain the mtv and the separating axis, so I can resolve the collision ...
0
votes
1
answer
425
views
How to find which side was collided with using SAT
I am using Separating Axis Theorem to check whether two polygons (player and object) intersect. I want to make the player bounce off the object, but to do this I need the side (from which I will ...
0
votes
1
answer
338
views
Separating axis theorem falsely triggers
I'm writing some code in C++ for testing collisions using the separating axis theorem and in certain orientations it wrongly triggers that there is a collision occurring
I'm following this tutorial, ...
1
vote
0
answers
330
views
How to find minimum translation vector of rotated squares?
I've made a collision detection algorithm that can detect if rotated squares are colliding. I am struggling to understand what I should do to resolve these collisions. I think the first step is to ...
0
votes
1
answer
303
views
Separating Axis Theorem Implementation always returning true. What am I doing wrong?
I'm trying to implement collision detection for concave polygons in Javascript/p5.js using the Separating Axis Theorem. I've been following the following tutorial on how to use it: http://www.dyn4j....
3
votes
2
answers
264
views
Separating Axis Theorem function fails when met with acute angles
This is a little library I was making for the LOVE2D engine in Lua, which uses separating axis theorem to solve collisions.
I was so happy when I got my SAT program to work, and started testing it ...
1
vote
0
answers
789
views
Can I simplify this implementation of the separating axis theorem?
I have a working convex 2d polygon vs convex 2d polygon collision test based on the separating axes theorem (SAT).
My question is:
Is it possibly to implement this algorithm without correcting the ...
1
vote
1
answer
308
views
Separating axis theorem difficulties
I'm having huge problems with this collision detection algorithm. I understand how it works, but I don't know how to implement it in my code, even though I've seen a lot of tutorials on it. There's ...
4
votes
1
answer
2k
views
Point of intersection between Oriented Boxes (or OBB)
I am trying to write a Rigid body simulator, and during simulation, I am not only interested in finding whether two objects collide or not, but also the point as well as normal of collision. I have ...
0
votes
0
answers
252
views
Separating Axis Theorem - Python Implementation from Cartesian Points
Im trying to implement SAT in Python and can't seem to get it working. There is a lot on information on the net but none of it seems to explain the code (at least in a way I can understand) and how to ...
0
votes
0
answers
98
views
Error with Separating axis theorem
I've been struggling to implement SAT for a long time now and this is my last resort, after doing visual checks on my code it seems that I am correctly getting the face normals of the shapes that I am ...
-1
votes
1
answer
995
views
SAT Collision detection - Corners fix
I'm building a game and I'm currently working on the physics.
I'm using the SAT algorithm to detect collisions. The collisions are between the character (AxisAlignedBoundingBox) and some rectangles (...
0
votes
2
answers
3k
views
Python int object is not subscriptable
I'm currently trying to implement my own SAT (separating axis theorem) collision detection system but have run into an issue. On line 34 I'm getting this error message:
line 34, in collision
...
4
votes
1
answer
3k
views
Finding the MTV (Minimal Translation Vector) using Separating Axis Theorem
So I've been trying to get collision detection and response working in my game project using the Separating Axis Theorem. I've managed to detect the collision, but for the life of me I cannot manage ...
4
votes
1
answer
539
views
Separation Axis Theorem MVT along only one axis
I am having trouble calculating 3D penetration vector along one axis. I already implemented SAT and it works. I want to calculate how much i need to offset first box from other so it will always sit ...
1
vote
0
answers
147
views
How to store edges of convex polygon?
I'm making my own simple 2D-Game's engine and I want to use Separating Axis Theorem to detect collisions but it requires objects to be convex polygons and I would really love to be able to create ...
0
votes
1
answer
1k
views
Collision detection: Separating Axis Theorem - Circle versus Polygon
I've been trying to implement collision detection between circles and polygons based on Randy Gaul's C++ Impulse Engine, following the code pretty closely, but the algorithm never returns true.
Here'...
1
vote
0
answers
842
views
Time complexity of Separating Axis Theorem
How would you determine the complexity based on the number of polygons (triangles)? Please correct or confirm my approach here.
Assuming we have a pyramid and start adding a vertices. From six ...
0
votes
0
answers
134
views
Separation of convex polygons in 2d
I am trying to find whether or not two convex polygons intersect. I read that one of the most efficient way is using The Method of Separating Axes.
I found some code in this book http://www....
1
vote
0
answers
286
views
Separating axis in matlab
I've been working on implementing separating axis algorithm in matlab. I've searched a lot but I didn't come up any solution. Could you point the mistake?
Thanks in advance
function flag = ...
3
votes
1
answer
833
views
Calculating the resultant velocity vector after a 2D collision
Currently I have a mini physics game which uses Separating Axis Theorem for collision detecting and response, however I came to a standstill when I discovered that there wasn't much documentation on ...
2
votes
1
answer
1k
views
SAT Minimum Translation Vector isn't correct
Is SAT's Minimum Translation Vector always correct and precise in all instances?
I calculate it by iterating over all the possible axes and check for overlap on each then keep tracking of which axis ...
5
votes
1
answer
560
views
Separating axis theorem: rotation around center of mass
The problem is in Polygon::FindAxisLeastPenetration:
double Polygon::FindAxisLeastPenetration(unsigned int *faceIndex, const Polygon &polygonA, const Polygon &polygonB) const {
double ...
0
votes
1
answer
304
views
Separating axis theorem algorithm not working
Writing a separating axis implementation based off the following guide, using Haxe. Can't seem to figure out why it's not working, tested individual parts but it always returns true for collisions ...
4
votes
1
answer
1k
views
Determine if crop rect is entirely contained within rotated UIView
Premise: I'm building a cropping tool that handles two-finger arbitrary rotation of an image as well as arbitrary cropping.
Sometimes the image ends up rotated in a way that empty space is inserted ...
10
votes
1
answer
2k
views
Objective-C check if subviews of rotated UIViews intersect?
I don't know where to start with this one. Obviously CGRectIntersectsRect will not work in this case, and you'll see why.
I have a subclass of UIView that has a UIImageView inside it that is placed ...
147
votes
20
answers
103k
views
Algorithm to detect intersection of two rectangles?
I'm looking for an algorithm to detect if two rectangles intersect (one at an arbitrary angle, the other with only vertical/horizontal lines).
Testing if a corner of one is in the other ALMOST works. ...