mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Add Get Center Method for Rect2/Rect2i and AABB.
This commit is contained in:
parent
87de2e7c4a
commit
90908cd67d
33 changed files with 133 additions and 56 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue