Questions tagged [aabb]

Axis-Aligned Bounding Box (see Bounding Box) - an extremely simplified representation of the size and position of a 2D or 3D graphical object, in the shape of a box.

Filter by
Sorted by
Tagged with
0 votes
1 answer
38 views

Swept AABB corners collisions

I'm working on a small SFML engine, and i'm trying to implement continuous collisions. It's working great, but the corners are getting detected as collisions and i can't figure out why. I already ...
0 votes
1 answer
632 views

Swept aabb 3d incorrect collision resolution along negative normals

I have followed this tutorial and ported it to 3d with glm. Everything works fine when the collision normal is reported as positive ((1,0,0),(0,1,0),(0,0,1)) but when it is negative the player aabb ...
0 votes
1 answer
79 views

Collisions detected prematurely, before rectangles actually touch

I am creating a game with Pygame but my collisions are registering too soon. I'm using this code to end the game when the player collides with a pipe: ...
0 votes
1 answer
422 views

AABB collision detection not detecting in some cases

I'm using simple AABBs in a tile based world, and for some reason the algorithm does not detect collisions when moving towards the left and then down. I actually upload a video to YouTube to ...
0 votes
1 answer
78 views

How to stop player when they hit an axis aligned bounding box?

I'm in the process of creating a game using electron and HTML5. It's going to be a pretty basic story-based platformer, but I'm ...
0 votes
1 answer
1k views

Swept 3d capsule intersection with AABB, what am I actually supposed to use to accomplish this?

I'm trying to figure out how to do continuous collision with a capsule (which would represent a collision volume for a player for example). Given how common the capsule is in many game engines, and ...
65 votes
11 answers
111k views

most efficient AABB vs Ray collision algorithms

Is there a known 'most efficient' algorithm for AABB vs Ray collision detection? I recently stumbled accross Arvo's AABB vs Sphere collision algorithm, and I am wondering if there is a similarly ...
0 votes
1 answer
237 views

How to resolve swept AABB collision when two boxes are hit at exactly the same time?

I've read many posts here about sweeping AABB collisions and the corner problem. But I still couldn't solve the problem. In the image below, the object starts touching both boxes, and when I apply a ...
51 votes
7 answers
10k views

2D Platformer AABB collision problems

I have a problem with AABB collision resolution. I resolve AABB intersection by resolving the X axis first, then the Y axis. This is done to prevent this bug: http://i.stack.imgur.com/NLg4j.png The ...
1 vote
1 answer
599 views

Frustum culling takes ages c++

I have two ways of doing frustum culling taken from different web sources. First one takes 200ms to check 10k AABBs, second around 50ms for the same box count. I read some forum answers, people say 0....
0 votes
1 answer
109 views

Ray vs AABB (2D) reporting hits

I've been working a 2D ray versus AABB implementation. I worked it out on paper, then read about a popular "branchless" algorithm. I decied to try the branchless one, but it gives me ...
2 votes
1 answer
2k views

3D line segment AABB collision, with hit normal?

I'm embarrassed I can't find this, but I'm wanting to detect intersection with a 3D line segment (not an infinite ray) with a 3D AABB, the AABB being defined as two Vec3f's which represent the Min and ...
2 votes
1 answer
1k views

How do I deal with AABB sweep ghost collisions?

I've been trying to wrap my head around this for some time now. I wrote an implementation of AABB sweep collision detection. I though I understood the idea but it didn't work as expected. I rewrote it ...
1 vote
1 answer
1k views

Getting the point of intersection from this fast ray box intersection algorithm

I have seen lots of such algorithms that return a Boolean value, but I also need to get back the intersection point and ray length. I am looking into this example, but I'm not sure how I can extract ...
0 votes
0 answers
135 views

Swept AABB vs Line Segment in 2D

I've been trying to get a swept collision detection up and running now for almost a week and I can't for the life of me get it working. There is a answer on this linked here below: Swept AABB vs Line ...
0 votes
1 answer
575 views

Swept AABB: finding collision normal in 3D?

I was following this tutorial which explains how to detect and resolve a 2d swept aabb collisions. I got the detection part working on 3d, but know I need a way to properly make a response, like ...
1 vote
1 answer
282 views

Determining first voxel ray intersects

I'm trying to implement the Fast Voxel Traversal Algorithm on a uniform grid of axis-aligned rectangles. Having read the paper, I understand how the traversing works, but not the initialization. I've ...
1 vote
0 answers
40 views

Acceleration structure for AABBs with many overlaps

I have large number of AABB in 2D. They are created around complex polygons and I use them as pre-test before real point in polygon test (which is expensive). I was thinking of creating acceleration ...
3 votes
2 answers
2k views

Swept AABB Collision Detection Conflict with Tile-sized Gaps

Background The sweeping method for detecting and resolving collision has proven to be very versatile to implement collision for our game, and I have this GameDev.net article to thank for that: https://...
0 votes
0 answers
60 views

What is the most efficient way to find hit point of BOX and internal Ray?

most efficient AABB vs Ray collision algorithms I found this topic on AABB ray test. Some of them could find hit point of external Ray and BOX. I did my version for both external and internal ray, but ...
3 votes
2 answers
2k views

Getting the bounding box of a sphere

I have a sphere with values center,radius and I need to convert the sphere to a bounding box with values min,max. How do I ...
0 votes
1 answer
224 views

Categorize contact & overlap cases for 2D & 3D axis-aligned bounding boxes

My question is similar to this one. I want to determine whether two axis-aligned boxes are not only intersecting, but if they are intersecting and just touching on one edge or face, or if they are ...
8 votes
5 answers
18k views

Collision between AABB and Circle

I'm programming collision systems for a 2D game engine. The idea is that different systems can interact with each other. So one of the cases would be check collisions between axis aligned bounding box ...
8 votes
3 answers
7k views

2D AABB vs AABB Sweep : How to calculate hit normal?

I've implemented a 2D AABBvsAABB sweep cast into my game, however, I'm having difficulty calculating the hit normal of the sweep cast. I have the sweep direction, both a and b AABB positions and xy ...
1 vote
1 answer
120 views

Why is my AABB vs AABB code returning false positives

I am trying to do AABB vs AABB collision and the code is never finding a collision. ...
0 votes
2 answers
488 views

AABB Collision Detection Confusion

I am trying to understand and implement AABB collision to learn simple 2D game physics. I'm following a tutorial and its method is a bit different to other websites. It uses the center of the object ...
-1 votes
2 answers
223 views

Inconsistent AABB collision detection

I'm making an endless jumper as my first game and I'm running into some problems with the one-way collision detection. Collisions are detected correctly most of the time but occasionally the player ...
1 vote
1 answer
364 views

2D AABB Collision

Detecting a 2d collision is easy, but after that, I'm having trouble fixing the AABB position to where it should be. I think it would be something like ...
1 vote
1 answer
96 views

Can't get AABB Collision to work properly

This is the code I'm using to resolve collisions on the players left side. It works when I'm on the ground, but if I'm falling, it does not work. ...
1 vote
2 answers
280 views

How can I check if the mouse hits a quad in 3d, and where it hits it?

I have a sketch that produces the following: ...
1 vote
1 answer
265 views

AABB test does not consistently detect edge-to-edge contact when bounds are very different in size

My function compares two AABBs for collision detection, and when they are around the same size it works fine, but I noticed that if I greatly decreased the size of one of them (or augmented the size ...
3 votes
1 answer
3k views

AABB to AABB collision response

I am currently trying to resolve collision between two AABBs. I already have a function that can detect if the the two boxes are colliding and returns true if the two boxes are colliding. The problem ...
1 vote
2 answers
295 views

How do I determine which voxels to test for collision against the player?

I've implemented Minkowski subtraction to test whether (and where) two AABBs collide, independent of framerate/time-step, in my Minecraft-like game. But since there may be tens of thousands of voxels,...
1 vote
1 answer
133 views

Positioning of AABB / Rectangles

I am wondering what is the best way to position rectangles, the ways I have thought of are: Have an x and y at upper left, then have a width and height Have an x and y at upper left, and an x and y ...
2 votes
2 answers
4k views

Find the Contact Normal of Rectangle Collision

It seems a lot of people have asked similar questions on this site, and every time it seems like a whole bunch of answers that don't work are given. Basically, I have two rectangles (AABBs) that ...
2 votes
1 answer
3k views

How do Axis-Aligned Bounding Boxes update with rotations?

I have a bounding box class with a min (x,y,z) and max point (x,y,z). The object that is being rotated has a rotation matrix (3x3 matrix), but I don't know how to update the bounding box with ...
3 votes
3 answers
1k views

How do I resolve a collision of a circle with two rectangle corners?

I'm writing a simple non-physical one-circle-to-many-rectangles collision detector/resolver. For collision detection, I'm using a very common algorithm, and it's working pretty well. For collision ...
1 vote
1 answer
312 views

Benefits of going full AABB?

By "going full AABB" I mean using only AABBs for all of your objects (both dynamic and static), with dynamic objects colliding both with each other and static objects. In what specific ways does this ...
0 votes
0 answers
435 views

How do I get an aabb's collision normal [duplicate]

I have two aabbs and I need to know the collision normal of the to help me slide the aabbs across themselves. I have searched google but nothing really came up. How do I get the collision normal of ...
3 votes
2 answers
2k views

How do I test if an AABB and concave polygon intersect?

The player's collider is an axis-aligned bounding box in my 2D platformer, but the environment can be different shapes. I already have collision-detection that prevents the player from going through ...
-1 votes
2 answers
56 views

SAP method freezes

When I run this method in game the code freezes. Here are the methods: ...
1 vote
1 answer
87 views

How do I get a table of AABB's?

I am not sure if this is the right site to put this question on. What would be a good, time saving method to reference an AABB with an integer id in Java programming language? AABB class: ...
0 votes
1 answer
560 views

How do I get extents in my mesh

I am creating a AABB for collision detection. I need to calculate the extents for my model and also update them when my model moves. I calculate my min and max when I create my mesh and I use my ...
3 votes
1 answer
5k views

How do I implement a AABB-Sphere collision

i have been trying to implement an aabb-sphere collision. This is what I tried ...
0 votes
1 answer
953 views

How do you implement AABB?

I am having some trouble peforming an overlap test on a axis aligned bounding box. Here is my code ...
0 votes
2 answers
437 views

CCD in C++ Console application

I am writing a game in a c++ console application. I would like to detect whether or not there is a collision between two objects, and displace them accordingly. All sprites are simply strings drawn on ...
1 vote
1 answer
237 views

Jitters in collision reaction

I'm working on a project for school and I'm having some trouble solving a bug. When the player collides with a rectangle the sprite/hitbox keeps jittering while the player has momentum in the ...
1 vote
2 answers
484 views

Why is my sliding AABB collision acting strange?

I'm working on a Minecraft like game engine and recently I've been trying to add good collision response which I have kind of. The collision response is perfect when I try and go through the right ...
2 votes
3 answers
1k views

Array-based tilemaps and bounding box (aabb?), how to do efficient tile collisions?

At one point in my game I had every tile as it's own object, so that I could use standard AABB collision testing easily. I later realized this was horrible for performance and simply made my tiles be ...
2 votes
2 answers
2k views

AABB vs Rectangle

I'm trying to wrap my head around 2D physics and stumbled upon Axis Aligned Bounding Boxes, and I have a couple of questions regarding them. In all AABB structs I could find out there, people prefer ...