# 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.

106 questions
Filter by
Sorted by
Tagged with
1 vote
406 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 ...
• 161
71 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 ...
348 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 ...
79 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 ...
• 1,203
1 vote
204 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 ...
• 111
709 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 ...
• 1,663
1 vote
35 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 ...
• 1,086
1k 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://...
46 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 ...
• 101
125 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 ...
• 103
960 views

### How to get the overlap volume of OBB and or ABB?

The following code is a current attempt at a function I have to determine if two bounding boxes overlap. The bounding box structures are [min[x,y,z], max[x,y,z]] ...
• 285
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 ...
• 49
336 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 ...
• 25
1 vote
264 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
207 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: ...
• 125
1 vote
90 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. ...
• 21
2k 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 ...
• 125
212 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 ...
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 ...
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 ...
1 vote
265 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 ...
• 264
434 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 ...
1 vote
110 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. ...
56 views

### SAP method freezes

When I run this method in game the code freezes. Here are the methods: ...
1 vote
79 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: ...
490 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 ...
4k views

### How do I implement a AABB-Sphere collision

i have been trying to implement an aabb-sphere collision. This is what I tried ...
1 vote
250 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,...
• 803
756 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 ...
402 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
216 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
441 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 ...
1k 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 ...
• 193
959 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 ...
• 786
545 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 ...
• 1
1 vote
827 views

### How to get the center position for AABB of rotated mesh right?

I want to calculate the AABB for my rotated & translated mesh, but whatever I tried, I can't calculate the center position correctly if the mesh is rotated. My mesh is defined by an array of ...
• 524
1 vote
1k views

### How to recalculate AABB after rotation?

I'm facing a problem trying to calculate the AABB on my models after rotation is applied. The rotation is not applied on the vertex positions directly, but in a seperate rotation matrix - just ...
• 524
1 vote
256 views

### AABB 2D Collision response teleports player when hit on wrong edge

I'm currently breaking my head with collision detection and resolving in C++ for my 3D game engine. But currently I'm trying to get resolving to work in 2D. The problem is that when I hit the solid ...
• 138
1 vote
141 views

### Problem with collisions with tiles, using AABB

After having a little look around about collisions. I can't seem to find what i'm doing wrong every time i touch the bottom of the tile it send's me through it and throws me out to the right of the ...
• 25
128 views

### FInd out if AABB is left/right/below or obove a ray

What algorithms are there to find out in which quadrant of the ray an AABB is given a roll value? My idea was to rotate the cube by the negative rotation of the ray and move it by the negative ...
• 245
218 views

### How to prevent corner slipping with a shortest axis collision solver

Currently I use AABB's to represent objects in my game engine, I resolve collisions between them by finding the shallowest axis, but this leads to a problem if an object is approaching another in a ...
• 3
1 vote
986 views

### Technique to find a mesh intersecting with a primitive solid without using colliders?

For what it's worth I'm using Unity3d, but I believe the problem is more general. There are hundreds if not thousands of meshes with hundreds of vertices each. There is one sphere that can be ...
252 views

### When to calculate AABB collisions

I was wondering if collisions are usually calculated the exact moment an object is moved or if it is calculated in the game loop. I haven't been able to find anything on this. Thanks
981 views

### Could triangles be used for swept-AABB checks between positions?

I'm trying to understand swept-AABB collision detection. When checking for collisions between two positions of an object, I commonly see one of 3 strategies used: Rays: trace rays from parts of the ...
• 211
167 views

### Swept AABB vs AABB Calculation Error

I'm having issues running simple AABB vs AABB collision detection. I'm able to successfully detect collisions without checking with velocity. But for some reason my code keeps prematurely firing ...
• 121
1 vote
581 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....
• 182
217 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
1k views

### Swept AABB Collision and Response Problems

I am working on a simple 2D game, and I am having problems with collision detection and response. I am using code adapted from this article: http://www.gamedev.net/page/resources/_/technical/game-...
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 ...
• 123