1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +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

@@ -1621,7 +1621,7 @@ void RendererCanvasRenderRD::light_update_directional_shadow(RID p_rid, int p_sh
Vector2 light_dir = p_light_xform.elements[1].normalized();
Vector2 center = p_clip_rect.position + p_clip_rect.size * 0.5;
Vector2 center = p_clip_rect.get_center();
float to_edge_distance = ABS(light_dir.dot(p_clip_rect.get_support(light_dir)) - light_dir.dot(center));