godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.54k stars 21.08k forks source link

Unable to get AABB of MeshInstance3D deformed by Skeleton3D bones #90465

Closed ManasMakde closed 6 months ago

ManasMakde commented 6 months ago

Tested versions

System information

Godot v4.2.1.stable.mono - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 Ti (nvidia; 525.147.05) - AMD Ryzen 7 4800H with Radeon Graphics (16 Threads)

Issue description

when retrieving the AABB using get_aabb() for a MeshInstance3D deformed by Skeleton3D it doesn't give the aabb of the deformed mesh but only of the original orientation

It has been pointed out that it isn't exposed in the scripting languages even though it is calculated internally

ffrOS

Why should it be exposed?

An example where it would be handy is if the mesh image was needed to be captured using SubViewport,
Knowing the AABB of the deformed mesh would allow for the camera to completely & precisely bring into view the deformed mesh

Steps to reproduce

  1. Import a rigged model from blender
  2. Deform the model's mesh via Skeleton3D bones
  3. Try and retrieve AABB using get_aabb()

Minimal reproduction project (MRP)

Mesh Deform MRP.zip

JekSun97 commented 6 months ago

I confirm this problem on 4.2.1 and 4.3 dev 5, I have not checked other versions @akien-mga

AThousandShips commented 6 months ago

Thank you for reporting, consolidating in: