Bounding box values stay same?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By humbletang

I’m attempting to use information about a MeshInstance’s bounding box to place a camera near it using gdscript. The thing that’s throwing me off is that the values within the aabb don’t seem to change even as I translate, rescale, or rotate the MeshInstance.

Am I misunderstanding the utility of a aabb? Or is this a bug?

How are you getting the bounding box info? Have you tried get_transformed_aabb()?

https://docs.godotengine.org/en/stable/classes/class_visualinstance.html#class-visualinstance-method-get-transformed-aabb

jgodfrey | 2022-12-13 00:01

Oh no! I wasn’t looking at that and that’s pretty much exactly what I need.

humbletang | 2022-12-13 00:12

:bust_in_silhouette: Reply From: humbletang
How are you getting the bounding box info? Have you tried get_transformed_aabb()?

https://docs.godotengine.org/en/stable/classes/class_visualinstance.html#class-visualinstance-method-get-transformed-aabb
commented 11 minutes ago by jgodfrey

jgodfrey solved this one