diff --git a/Characters/Meldewesen/Meldewesen.tscn b/Characters/Meldewesen/Meldewesen.tscn index dfed950..32848c4 100644 --- a/Characters/Meldewesen/Meldewesen.tscn +++ b/Characters/Meldewesen/Meldewesen.tscn @@ -150,8 +150,41 @@ material/0 = null transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 1.71555, 0 ) shape = SubResource( 5 ) +[node name="InteractCheckRays" type="Spatial" parent="."] +transform = Transform( 1, 0, 0, 0, 0.940387, 0.340106, 0, -0.340106, 0.940387, 0, 2.493, 0.464 ) + +[node name="InteractCheckCast1" type="RayCast" parent="InteractCheckRays"] +transform = Transform( 0.969178, 0.0347382, 0.243902, 0.0829525, 0.886188, -0.45584, -0.231978, 0.462022, 0.855992, 0, 1.76314, 0.144732 ) +enabled = true +cast_to = Vector3( 0, -10, -40 ) +collision_mask = 3 + +[node name="InteractCheckCast2" type="RayCast" parent="InteractCheckRays"] +transform = Transform( 0.969178, -0.0347382, -0.243902, -0.0829525, 0.886188, -0.45584, 0.231978, 0.462022, 0.855992, 0, 1.76314, 0.144732 ) +enabled = true +cast_to = Vector3( 0, -10, -40 ) +collision_mask = 3 + +[node name="InteractCheckCast3" type="RayCast" parent="InteractCheckRays"] +transform = Transform( 1, 0, 0, 0, 0.8784, -0.477925, 0, 0.477925, 0.8784, 0, 1.76314, 0.144732 ) +enabled = true +cast_to = Vector3( 0, -10, -40 ) +collision_mask = 3 + +[node name="InteractCheckCast4" type="RayCast" parent="InteractCheckRays"] +transform = Transform( 0.994522, 0.0499568, 0.0918178, 0, 0.8784, -0.477925, -0.104528, 0.475307, 0.873588, 0, 1.76314, 0.144732 ) +enabled = true +cast_to = Vector3( 0, -10, -40 ) +collision_mask = 3 + +[node name="InteractCheckCast5" type="RayCast" parent="InteractCheckRays"] +transform = Transform( 0.994522, -0.0499568, -0.0918178, 0, 0.8784, -0.477925, 0.104528, 0.475307, 0.873588, 0, 1.76314, 0.144732 ) +enabled = true +cast_to = Vector3( 0, -10, -40 ) +collision_mask = 3 + [node name="Visibility" type="Area" parent="."] -transform = Transform( 1, 0, 0, 0, 0.940387, 0.340106, 0, -0.340106, 0.940387, 0, 2.29274, 0.463551 ) +transform = Transform( 1, 0, 0, 0, 0.940387, 0.340106, 0, -0.340106, 0.940387, 0, 2.493, 0.464 ) collision_layer = 4 collision_mask = 4 script = ExtResource( 6 ) @@ -173,20 +206,6 @@ shadow_enabled = true spot_range = 11.6162 spot_angle = 19.7549 -[node name="InteractCheckRays" type="Spatial" parent="Visibility"] - -[node name="InteractCheckCast1" type="RayCast" parent="Visibility/InteractCheckRays"] -transform = Transform( 0.965926, 0, 0.258819, 0.0880259, 0.940387, -0.328517, -0.24339, 0.340106, 0.908345, 0, 1.76314, 0.144732 ) -enabled = true -cast_to = Vector3( 0, -10, -40 ) -collision_mask = 3 - -[node name="InteractCheckCast2" type="RayCast" parent="Visibility/InteractCheckRays"] -transform = Transform( 0.965926, 0, -0.258819, -0.0880259, 0.940387, -0.328517, 0.24339, 0.340106, 0.908345, 0, 1.76314, 0.144732 ) -enabled = true -cast_to = Vector3( 0, -10, -40 ) -collision_mask = 3 - [node name="InteractArea" type="Area" parent="." groups=[ "Enemy", ]] diff --git a/Characters/Meldewesen/Visibility.gd b/Characters/Meldewesen/Visibility.gd index 5c3868a..9f4eda5 100644 --- a/Characters/Meldewesen/Visibility.gd +++ b/Characters/Meldewesen/Visibility.gd @@ -1,9 +1,9 @@ extends Area -onready var rays = get_node("InteractCheckRays") +onready var rays = get_node("../InteractCheckRays") -var max_distance = 20 +var max_distance = 40 func _process(delta: float) -> void: @@ -21,4 +21,5 @@ func _process(delta: float) -> void: if potential_new_scale < new_scale: new_scale = potential_new_scale - scale = Vector3(new_scale, 1.0, new_scale) \ No newline at end of file + scale = Vector3(new_scale, new_scale, new_scale) + translation.y = 2.3 + (1.0 - new_scale) * 2.0 # Need to compensate for offset caused by y translation \ No newline at end of file