Add get_object_center method to misc.gd

This commit is contained in:
JeremyStar™ 2023-08-25 16:57:17 +02:00
parent b574ca6900
commit f9f42095cf

View file

@ -66,3 +66,7 @@ func flat_float(number:float) -> float:
func flat_float_int(number:float) -> int:
return int(number)
# Get object center
func get_object_center(child_size:float,parent_size:float) -> float:
return parent_size/2-child_size/2