Thanks for the greeting @TwistedTwigleg
I tried your suggestion - it didn't help, but an interesting thought.
The point is that... if we calculate the location of a point in the zone using hardcode - everything works, but the function itself (has_point ()) - does not. Very strange
extends CollisionShape
####
export (NodePath) var theObject
####
func _ready():
var thisArea = AABB(self.get_global_transform().origin, self.shape.extents*2.0)
var min_x = thisArea.position.x - thisArea.size.x/2.0
var max_x = thisArea.position.x + thisArea.size.x/2.0
var min_y = thisArea.position.y - thisArea.size.y/2.0
var max_y = thisArea.position.y + thisArea.size.y/2.0
var min_z = thisArea.position.z - thisArea.size.z/2.0
var max_z = thisArea.position.z + thisArea.size.z/2.0
####
var other_point = get_node(theObject).get_global_transform().origin
var area_has_point:bool
##
if thisArea.has_point(other_point): area_has_point = true
else: area_has_point = false
##
var x = other_point.x
var y = other_point.y
var z = other_point.z
##
var oldstyle_way_bool:bool
##
if x > min_x and x < max_x and y > min_y and y < max_y and z > min_z and z < max_z:
oldstyle_way_bool = true
else: oldstyle_way_bool = false
####
print("thisArea position ", thisArea.position)
print("thisArea size ", thisArea.size)
print("---")
print("thisArea min ", thisArea.position - thisArea.size/2.0)
print("thisArea max ", thisArea.position + thisArea.size/2.0)
print("other_point position ", other_point)
print("---")
print("area_has_point is (", area_has_point,")")
print("oldstyle_way_area_has_point is (", oldstyle_way_bool,")")
Output:
thisArea position (0, -2.57935, 4.75502)
thisArea size (11.57966, 3.84184, 4.5487)
thisArea min (-5.78983, -4.50027, 2.48067)
thisArea max (5.78983, -0.65843, 7.02937)
other_point position (1.98178, -2.57241, 3.52972)
area_has_point is (False)
oldstyle_way_area_has_point is (True)