# Bounding info slow update?

**URL:** <https://forum.babylonjs.com/t/bounding-info-slow-update/6641>\
**Category:** Questions\
**Created:** [October 29, 2019, 6:35pm UTC](https://forum.babylonjs.com/t/bounding-info-slow-update/6641 "2019-10-29T18:35:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keeger](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@Keeger](https://forum.babylonjs.com/u/Keeger)\
**Post date:** [October 29, 2019, 6:35pm UTC](https://forum.babylonjs.com/t/bounding-info-slow-update/6641/1 "2019-10-29T18:35:20Z")

</div>

I was working on a test concept, and copied the Polygon example from the meshBuilder docs.

it was a little big for my needs, so i scaled it, and attempted to get the new radius.

the radius never changes for the sphere, and the diagonalLength value updates at some point in the future.

I looked through the docs, and I did not see anything that looked like an event or observable related to bounding info changes. i tried the geometry property (onGeometryUpdated) and i tried onRebuildObservable. no joy.

Two questions:

## 1

How can I know when the bounding info has finished re-building?

## 2

Why does the sphere radius never seem to change? I like using radius because often I work with round objects, and it’s pretty simple. I can change to use the diagonalLength, that’s essentially the same thing I think, but see question 1 for that 🙂

## PG

[https://playground.babylonjs.com/#67L058#1](https://playground.babylonjs.com/#67L058#1)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [October 29, 2019, 10:57pm UTC](https://forum.babylonjs.com/t/bounding-info-slow-update/6641/2 "2019-10-29T22:57:37Z")

</div>

Bounding infos are refreshed as soon the call to `refreshBoundingInfo()` return, there is no delay / async operations.

The bounding sphere radius does not change because you don’t change the geometry (meaning the vertices of your polygon).

However, if you want to get the radius after the `worldMatrix` is applied, use `.radiusWorld` instead of `.radius`: you will see that `.radiusWorld` is indeed scaled by your `scalingDeterminant` value.

Last thing: you want to call `polygon.computeWorldMatrix();` after you have set the value for `scalingDeterminant`, so that the bounding box infos based on world coordinates (like `diagonalLength`) are correct.

See: [https://playground.babylonjs.com/#67L058#3](https://playground.babylonjs.com/#67L058#3)

---

<div class="post-metadata">

**Author:** ![Keeger](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@Keeger](https://forum.babylonjs.com/u/Keeger)\
**Post date:** [October 30, 2019, 1:01am UTC](https://forum.babylonjs.com/t/bounding-info-slow-update/6641/3 "2019-10-30T01:01:52Z")

</div>

Thank you sir for the explanation.

Is any of this in the docs? I haven’t seen many details like this from my searching, but maybe I missed it?

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [October 30, 2019, 5:16am UTC](https://forum.babylonjs.com/t/bounding-info-slow-update/6641/4 "2019-10-30T05:16:21Z")

</div>

I would say it not in the docs but in the source (API library also helps to understand how it works).

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [October 30, 2019, 9:07am UTC](https://forum.babylonjs.com/t/bounding-info-slow-update/6641/5 "2019-10-30T09:07:26Z")

</div>

Well, `radiusWorld` is in the doc.

Being a “world” thing (like `diagonalLength`), it’s expected to be dependent on the world matrix being up to date when querying these values.

Regarding `refreshBoundingInfo()` not being async, I would say that if the docs don’t say specifically it is async (it would have, had the function been async), you should assume it’s not (anyway, it would have been strange for this function to be async).
