Questions tagged [bounding-boxes]

The smallest box shape that fully encloses a 3D mesh. They are usually used for things like broad phase culling, a technique to do an initial coarse check for which parts of a 3D scene to include for rendering or collision detection.

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

Bounding Box/Rectangle collision glitches

I've been working on this golf game for a couple of weeks and have been trying to create a reliable collision system for whenever a golf ball (mini golf) hits a block. I'm using regular rectangular ...
Jet's user avatar
  • 1
0 votes
1 answer
65 views

Ray-Square Intersection where the Ray always lies on the Interior of the Square?

I recently wrote a quick shader toy for finding the point of intersection of a ray centered within a square--with optimization provided by the Graphics Programming discord: https://www.shadertoy.com/...
FatalSleep's user avatar
0 votes
0 answers
59 views

How can i move actor's bounding box center in relative location in Unreal Engine 5?

This is my situation. I need align the center of the object (it's box) and the center of the scene component. I have only center of the box TVector type or FVector. How can i do it? ...
anime username's user avatar
0 votes
0 answers
72 views

How can I make a bounding box better fit a sprite?

I'm working on a simple 2D platformer for learning purposes and I'm trying to add a bounding box to the player sprite. I've managed to get it working; however, I'm having difficulty with sizing it to ...
Konjointed's user avatar
0 votes
1 answer
509 views

How to check if one object's local bounding box contains another

I am currently trying to check whether the first object contains a second. I first tried to use the bounding box, but it is defined in world space, so it is not working with my rotated cubes. Then I ...
Muhammad Faizan Khan's user avatar
1 vote
0 answers
39 views

How to limit the character movements to a delimited area

Consider the below images get from the Final Fantasy VII and Alone In The Dark games: I assume that the above scenes are composed by a set of layers composing the background image (allowing thus the ...
Jean-Milost Reymond's user avatar
0 votes
0 answers
142 views

Optimal data structure for managing AABBs to minimize collision check queries

Say I have thousands of 2D Axis-Aligned Bounding Boxes (AABBs), and a single point. I'm checking whether a point is inside a certain AABB before performing some expensive logic. ...
cgdoofus's user avatar
0 votes
0 answers
374 views

Exact collision time of two axis-aligned bounding boxes

I am trying to calculate the exact collision time of two axis-aligned bounding boxes (aabb) as fast as possible (in the sense of CPU time). I have all the required information (aabb min, max, center, ...
ciyo's user avatar
  • 101
0 votes
0 answers
99 views

Knowing the size of a framebuffer when rendering transformed meshes to a texture

I have a couple of 2D meshes that make a hierarchical animated model. I want to do some post-processing on it, so I decided to render this model to a texture, so that I could do the post-processing ...
SasQ's user avatar
  • 101
1 vote
0 answers
112 views

Efficient acceleration structure for moving 3D objects in scene

I am implementing a 3D FPS game in C++. The game has large outdoors areas with both static and dynamic objects in the scene, with the following implicit assumptions: Static objects: Do not move ...
yah_nosh's user avatar
1 vote
1 answer
1k views

Ray-Box (AABB) is slower than without

I'm trying to write my own ray tracer. The last days I tried implementing a bounding box algorithm for it. But I'm getting a much slower frame rate with the bounding boxes turned on. I think it has ...
Georg Methner's user avatar
0 votes
1 answer
427 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 ...
user82395214's user avatar
0 votes
1 answer
467 views

Project 3D points to a plane, then project their bounding box back to 3D

I have a table in 3D space, represented by a plane. I want to project arbitary points representing an object (cup, toy, etc) onto that table, run 2D principal components analysis to get an oriented ...
user3180's user avatar
  • 101
0 votes
1 answer
363 views

What´s wrong with my Frustum Culling implementation?

I´m struggling with a weird problem since hours. Ive implemented frustum culling with the help of online articles and a book. The problem is that the objects are not culled correctly. I´m using ...
Arizon5000's user avatar
0 votes
1 answer
829 views

Terrain collision with sphere and OBB

I'm implementing my physics engine for my 3D game. So far I've been able to implement collision detection between OBB, spheres and planes. The engine generate contacts and resolve them with an ...
Luca's user avatar
  • 143
3 votes
1 answer
150 views

How to reduce the total time spent checking against my world bounds?

I'm making a game engine and currently I use a function for checking a new position after movement to prevent game objects from escaping the world: ...
Ivan Ivanov's user avatar
2 votes
1 answer
4k 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 ...
karamazovbros's user avatar
0 votes
2 answers
2k views

How to test for BoxCollider2D intersection in Unity?

I have a Player object with a BoxCollider2D component and a Ladder object also with a BoxCollider2D component. Each object has a ...
DyingIsFun's user avatar
  • 1,307
1 vote
2 answers
647 views

How to create a bounding box around a Sprite in C++?

Hello everyone, I am trying to create a bounding box around a Sprite in my simple Pong game. The bounding box needs to be a simple rectangle around the sprite so that it can act as a collision ...
jlw8's user avatar
  • 383
0 votes
2 answers
524 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 ...
Andrew Pratt's user avatar
4 votes
2 answers
2k views

Collision Resolution of Axis-Aligned Bounding Boxes that Change Size

I am developing an action platformer in Python, with Pygame. That said, my question is a general one about collision resolution strategies. I use an axis-aligned bounding box for the purposes of ...
DyingIsFun's user avatar
  • 1,307
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 ...
Accumulator's user avatar
0 votes
1 answer
738 views

Intersecting Triangle and BoundingBox in 3D environment

I am trying to check if a triangle is intersecting a BoundingBox in a 3D space with libgdx, but I am unable to find anything that can help me with that. I tried using a Plane but it is not precise ...
Azias's user avatar
  • 1
1 vote
1 answer
2k views

Find the 4 Corners of a Bounding Box of a Rotated, Offsetted Square

How does one find the coordinates of the 4 corners of a bounding box of a square of width w and height h that is rotated ...
Ibrahim's user avatar
  • 196
0 votes
1 answer
375 views

Collision Detection and Bounding Box Creation

I am trying to create bounding boxes. My goal is not to create them with giving x,y and z coordinates. But rather, I will be loading a model or else rendering a shape - say an aeroplane. The algorithm ...
gtushar31's user avatar
1 vote
1 answer
548 views

Given a point on the surface of an OBB, return normal of the face

So I have this class OBB which implements a test function that determines whether a ray hits it. If it does, a passed in struct ...
Elias Finoli's user avatar
0 votes
1 answer
2k views

Unity Vertex shader recalculate renderer bounds

I've made a simple billboard gpu instancing vertex shader that manipulates the verticies of an object based on the projection matrix. The problem is that the renderer bounds does not update to ...
user avatar
0 votes
1 answer
599 views

What are the advantages of using SAT(seperating-axis theorem ) in collision detection?

Lets say i need to check if two AABBs are colliding with each other. I would simply compare their corners. When am i gonna need SAT(heavy vector calculations) to do the same thing?
Ankit singh kushwah's user avatar
2 votes
2 answers
247 views

unity 5.5 - OnMouseClick not fired

On the Unity Editor, the OnMouseClick() function is fired but in my executable file it does not work. It is rare for it to fire, but it does not fire when the ...
XBM's user avatar
  • 31
2 votes
1 answer
1k views

Unity bounds includes the center of the scene

I'm trying to get the bounds of an object and put a box around it. Sounds simple right? I just encapsulate all the bounds together and use its center and size to do so. But the problem is one corner ...
Henjin's user avatar
  • 405
6 votes
4 answers
16k views

How to create a box collider that surrounds an object and its children?

I have a car that needs a box collider. If the car were 1 single mesh, I would only need to call: boxCol = gameObject.AddComponent<BoxCollider>(); ...
OC_RaizW's user avatar
  • 1,450
4 votes
1 answer
14k views

How can I get a Box Collider's "corners" (vertices) positions?

I attached a Box Collider to a object, which has not the center as its pivot. Now I need the 8 corner points. Right now I can only get the points in a unrotated state. But whenever I rotate the ...
OC_RaizW's user avatar
  • 1,450
0 votes
2 answers
358 views

Bounding box messed up for .fbx models

I am trying to make bounding boxes for my models. My code works fine if the model is imported as a COLLADA (.dae) file. When I try to import a model that has .fbx extension, my bounding box messes up. ...
syy's user avatar
  • 195
1 vote
2 answers
215 views

Create BoundingBoxes on a Model

I am trying to create multiple BoundingBoxes on a Model by following this tutorial: https://electronicmeteor.wordpress.com/2011/...
syy's user avatar
  • 195
0 votes
1 answer
96 views

XNA/MonoGame Collisions between two boxes don't work as expected

I have the following problem: I have two GameObjects (one is static, the other is the player). Both of them have one BoundingBox that surrounds them, and a List that contains more BoundingBoxes for a ...
shniqq's user avatar
  • 46
1 vote
1 answer
253 views

How to convert Triangle/OBB test to OBB/OBB test?

I'm using the collision library OZCollide and I want to do OBB vs. OBB collision tests. The problem is, that this function doesn't seem to exist but instead there is a AABB vs. OBB and a Triangle vs. ...
Anonymous Anonymous's user avatar
3 votes
4 answers
941 views

Bounding box rotated on import

For some reason my bounding box is always tilted when i import to unity. I've checked for loose geometry and everything but there's nothing.
Alex Richard's user avatar
0 votes
1 answer
108 views

OpenGL 3.3+ bounding volume only partly drawn

I am currently trying to set up a little debug view as I am planning to implement occlusion queries later. For those, I have written code to determine the "extreme coordinates" of the VAO I want to ...
JackWhiteIII's user avatar
1 vote
0 answers
73 views

Directional light view frustum stabilisation

Calculating directional light view frustum based on scene objects(bounding frustum) results in noticeable scene jittering on camera movement in CSM and non-CSM rendering code paths. What are the ...
Sergey K.'s user avatar
  • 121
1 vote
1 answer
545 views

Drawing order of 2D tiles with 3D bounding volume

I'm wondering which algorithm was used to draw the sprites of the video game Commandos in the correct order. Each sprite has a 3D bounding volume (either a polygon or a cylinder), this is how the ...
h3k's user avatar
  • 11
3 votes
1 answer
164 views

Bounding Volumes for Empty Space

I'm creating an Android game that relies heavily on collision detection for a couple of players (at least up to 4). I researched hierarchical structures that could speed up the process. Because I have ...
philipp's user avatar
  • 31
4 votes
1 answer
10k views

How can I calculate the bounding box of a 3D model?

I am making a game in OpenGL and Blender and trying to use JBullet as the collision manager. I am using BoxShapes for collisions, which requires a ...
user avatar
4 votes
2 answers
4k views

What are the disadvantages of R-Trees in collision detection?

I was poking around in SQLite and discovered R-trees. A little digging revealed that R-trees are really just fancy AABB-trees. Then I realize that the state of the art in collision detection (often ...
Steven Lu's user avatar
  • 740
3 votes
1 answer
312 views

Placing an AABB close to a point so that it doesn't intersect any other AABBs

Give a 2D space with a bunch of non-intersecting AABBs, and a point in this space (that may or may not be inside an AABB), how can I find the closest place where I can place a new AABB of a given size?...
TomD's user avatar
  • 33
2 votes
2 answers
130 views

Subdived objects in different shapes

Currently I'm working on an Android OpenGL 3D game and now I want to implement a collision detection. For this I want to use oriented bounding boxes but here is my problem. For a normal oriented ...
Cilenco's user avatar
  • 113
0 votes
1 answer
480 views

How do I get realistic sliding contact between objects in a voxel grid?

I have a 3D grid of voxels in my game. Entities walk around with simple physics that represents them as an axis aligned bounding box with velocity, mass and acceleration. The way I'm doing collision ...
mklingen's user avatar
  • 3,627
0 votes
1 answer
174 views

XNA SoundEffect won't stop playing

For my HND I've got to re-create Frogger, and everything was going swell until I tried adding some collision detection and sound. Whenever my player intersects a vehicle, the sound file just starts ...
Martyn Chapman's user avatar
0 votes
2 answers
295 views

Stuttering Character When Colliding With Wall XNA 4.0 Help!

I'm trying to make a platformer game without tiles. I've made a collision handler to handle collision between Player and Stage(platform)and a collision checker, here's the code: ...
Adi Faidz's user avatar
1 vote
2 answers
257 views

XNA/Monogame inverting a BoundingBox

I have a box that is drawn around my game that I want to check collisions with. Currently my BoundingBox is made in a way that whatever is inside the box is ...
Droes's user avatar
  • 13
1 vote
1 answer
1k views

Calculate an approximate distance between two rigid bodies or OOB

Is there any easy way to get an approximate distance between two OOB? I searched around and people talk about GJK algorithm, however I don't see it returning the distance between two convex objects ...
NachoChip's user avatar