xyz like i said, the numbers are the same:
var global_aabb:AABB
var global_aabb2:AABB
var local_aabb:AABB
var arr_y = []
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var mt:MeshInstance3D = node_3d_2_top_2.get_children()[0]
global_aabb= mt.global_transform * mt.get_aabb()
global_aabb2= node_3d_2_top_2.global_transform * mt.get_aabb()
local_aabb = mt.get_aabb()
var arr = []
for i in range(8):
var pt = local_aabb.get_endpoint(i)
var pt_glob = mt.to_global(pt)
arr.append(pt_glob)
for p in arr:
arr_y.append(p.y)
print("pos1: ",global_aabb.position)
print("pos2: ",global_aabb2.position)
print("siz1: ",global_aabb.size)
print("siz2: ",global_aabb2.size)
print("end1: ",global_aabb.end)
print("end2: ",global_aabb2.end)
print("top node: ",node_3d_3_plane.global_position)
print("arr: ",arr)
print("arr_y: ",arr_y)
print("arr_y max: ",arr_y.max())
pass # Replace with function body.
pos1: (-0.772845, 2.689352, -1.050277)
pos2: (-0.772845, 2.689352, -1.050277)
siz1: (1.54569, 1.536256, 1.723653)
siz2: (1.54569, 1.536256, 1.723653)
end1: (0.772845, 4.225608, 0.673377)
end2: (0.772845, 4.225608, 0.673377)