Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
26 views

Convey screenspace bounding box of rendering result

Imagine I render to an FBO some arbitrary geometry. Geometry can be rendered via single or multiple draw calls. For the sake of the question, assume I know nothing about geometry or transformation ...
0
votes
1answer
77 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 ...
3
votes
1answer
121 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: ...
1
vote
1answer
381 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 ...
0
votes
2answers
126 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 ...
0
votes
0answers
319 views

How do I convert the UI rect transform's width into a transform.position.x for my object?

I have an image that appears next to a UI button when that button is selected, and then moves to other buttons when the selection changes. I would like to be able to figure out the bounds of each ...
1
vote
2answers
199 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 ...
0
votes
2answers
177 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 ...
4
votes
2answers
600 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 ...
2
votes
3answers
443 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 ...
0
votes
1answer
176 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 ...
1
vote
1answer
541 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 ...
0
votes
1answer
247 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 ...
1
vote
1answer
303 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 ...
0
votes
1answer
579 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 ...
0
votes
1answer
77 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?
3
votes
2answers
146 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 ...
1
vote
1answer
286 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 ...
2
votes
3answers
5k views

How to create a boxcollider, which surrounds the gameobject and all of his children?

I have a Car, who needs a Box Collider. If the car would be 1 single mesh, i would only need to call: ...
2
votes
1answer
4k 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 ...
0
votes
2answers
131 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. ...
1
vote
2answers
98 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/...
0
votes
1answer
80 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 ...
1
vote
1answer
125 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. ...
2
votes
3answers
284 views

Unity3D/Blender: 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.
0
votes
1answer
49 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 ...
1
vote
0answers
49 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 ...
1
vote
1answer
356 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 ...
3
votes
1answer
83 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 ...
4
votes
1answer
5k 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 ...
4
votes
2answers
2k 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 ...
3
votes
1answer
154 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?...
2
votes
2answers
117 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 ...
0
votes
1answer
291 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 ...
0
votes
1answer
136 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 ...
0
votes
2answers
240 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: ...
1
vote
2answers
203 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 ...
0
votes
1answer
510 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 ...
3
votes
1answer
414 views

Wall-sliding Collision Response Only Works On One Axis (2D)

"sprite" is the player object, velocity is a Vec2 that tracks movement (is set to -1, 1, or 0 at any given time), each sprite in "sprites" is a wall of the same size as the player (everyone is a block ...
0
votes
1answer
752 views

How to resolve OBB collision penetration?

I would think this is a common issue, but I couldn't find an answer that helped me. Help would be appreciated. In my game I have rectangular objects. They have rotating bounding box, aka not AABB but ...
1
vote
0answers
210 views

How to calculate K-Dops faster?

I have my general understanding of K-Dops for collision detection. I understand how to calculate them. I also understand the super slow way of recalculating them. Example: I have a simple model of a ...
2
votes
2answers
554 views

Determine percentage of screen covered by an object without using frustum culling

On the CPU-side of an 3D first-person / ego perspective game I need to check whether what the players currently sees on screen is the inside of a box object defined by world space coordinates (the ...
1
vote
1answer
135 views

Calculate diameter of sphere large enough to encompasss a frustum

I'm attempting to speed up box-to-box collision checks by first testing if two spheres large enough to encompass each (respectively) would collide (because I'm using separating axis theorem and it's ...
1
vote
0answers
87 views

Setting up 3d Collision for Primitive shapes

Im having some trouble understanding how to set up collision detection between my first person camera and my primitive shapes which are made using the vertex buffer. Do i give my camera a boundingBox ...
0
votes
1answer
190 views

How to retrieve a cube collision by faces

I work for a while on a minecraft game (voxel). I am front a problem for a long time about the collision detection. I want recover the cubes collision from my highlighted black's cube like on the ...
1
vote
0answers
128 views

How calculate a new node after cutting a node into an octree

I'm working on a small XNA game, voxel-based like minecraft. I've recently faced a problem in how to delete a node (cube) from an octree and re-calculate the new octree afterward. I have already ...
0
votes
2answers
160 views

How to get all points within a box?

What is the fastest way to get all of the points within a bounding box? If I had an ArrayList<Point>, and they weren't mapped to coordinates, would I have to ...
3
votes
1answer
194 views

What is an axis aligned integer bounding box?

In this paper, in the Distance field computation section, it says that an axis aligned integer bounding box of a Prism has to be calculated. Can someone explain what an axis aligned integer bounding ...
0
votes
1answer
704 views

Bounding Box in Monogame for mouse picking - Ray perspective

My mouse ray is screwing up precision. I don't really know how to fix it, maybe you guys can help. problem : (5.6mg gif) https://www.dropbox.com/s/v0z67afso88hsd1/perspective_ray.gif how i create ...
1
vote
1answer
770 views

Bounding Box in Monogame for mouse picking

Hello guys so I'm implementing this mouse manager to be able to pick up objects. My application uses mainly textured quads in 3d space. I'm using bounding boxes in monogame to do so, however my ...