1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Add Get Center Method for Rect2/Rect2i and AABB.

This commit is contained in:
Anilforextra
2021-09-21 00:33:52 +05:45
parent 87de2e7c4a
commit 90908cd67d
33 changed files with 133 additions and 56 deletions

View File

@@ -2575,7 +2575,7 @@ void RendererSceneGIRD::VoxelGIInstance::update(bool p_update_light_instances, c
Vector3 render_dir = render_z[j];
Vector3 up_dir = render_up[j];
Vector3 center = aabb.position + aabb.size * 0.5;
Vector3 center = aabb.get_center();
Transform3D xform;
xform.set_look_at(center - aabb.size * 0.5 * render_dir, center, up_dir);