godot
godot copied to clipboard
FTI - `global_transform_interpolated()` on demand for invisible nodes
trafficstars
Fixes #107235 Forward port of #107307
Explanation
For visible nodes, the interpolated transform is already cached and calculated in SceneTreeFTI. However, invisible nodes do not calculate interpolated transforms (in order to save processing), thus getting their interpolated transform directly is not possible.
Instead we add mechanism to calculate this interpolated transform on the fly. This will be more expensive than for visible nodes, but can be handy in some situations.
Notes
- The limitation of
_is_vi_visible()toVisualInstancesis getting a little tiresome now, so I have a follow up PR (#107330) to change the calculation and caching ofis_visible_in_tree(), but that should be considered as a separate issue, and this PR will run fine without it.