Meldewesen player visibility works with new Player

This commit is contained in:
karl 2019-11-11 10:20:23 +01:00
parent d2ee524f72
commit f67b7e6361
3 changed files with 8 additions and 2 deletions

View File

@ -16,8 +16,9 @@ func _ready():
func _on_body_entered_visibility(body: Node):
Logger.trace("Meldewesen seeing %s" % [body])
if body.is_in_group("Player"):
print("Seeing player!")
Logger.info("Seeing player!")
# TODO: Check if the Player is in an area where they shouldn't be

View File

@ -4,7 +4,11 @@
[sub_resource type="CylinderShape" id=1]
[node name="Player" type="KinematicBody"]
[node name="Player" type="KinematicBody" groups=[
"Player",
]]
collision_layer = 5
collision_mask = 5
script = ExtResource( 1 )
body_nodepath = NodePath("Body")

View File

@ -75,6 +75,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )
shape = SubResource( 7 )
[node name="PathNavigatorForKinematicBody" parent="." instance=ExtResource( 2 )]
speed = 3.0
body_nodepath = NodePath("Meldewesen")
[node name="Meldewesen" parent="PathNavigatorForKinematicBody" instance=ExtResource( 3 )]