[gd_scene load_steps=10 format=3 uid="uid://dcyiylikqbml0"] [ext_resource type="Script" uid="uid://bivev0gbnbo5t" path="res://npc.gd" id="1_ideak"] [ext_resource type="PackedScene" uid="uid://ctx8osel3k43n" path="res://check_collision_wall.tscn" id="2_xxcha"] [ext_resource type="PackedScene" uid="uid://bhihpqj7er21q" path="res://check_collision_npc.tscn" id="3_kh24r"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_v7lw1"] albedo_color = Color(0.95, 0.91833335, 0, 1) [sub_resource type="CapsuleMesh" id="CapsuleMesh_ideak"] material = SubResource("StandardMaterial3D_v7lw1") [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xxcha"] albedo_color = Color(0.3250464, 0.7797206, 0.1373662, 1) [sub_resource type="SphereMesh" id="SphereMesh_kh24r"] material = SubResource("StandardMaterial3D_xxcha") [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ul7y6"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ideak"] radius = 1.4262695 height = 2.852539 [node name="NPC" type="CharacterBody3D"] collision_layer = 8 collision_mask = 3 script = ExtResource("1_ideak") [node name="MeshInstance3D" type="MeshInstance3D" parent="."] mesh = SubResource("CapsuleMesh_ideak") [node name="MeshInstance3D" type="MeshInstance3D" parent="MeshInstance3D"] transform = Transform3D(-1.8953326e-08, 0, 0.683138, 0, 0.5, 0, -0.43360156, 0, -2.986091e-08, -0.003729701, 0.500463, 0.37263048) mesh = SubResource("SphereMesh_kh24r") [node name="CollisionShape3D" type="CollisionShape3D" parent="."] shape = SubResource("CapsuleShape3D_ul7y6") [node name="RayCast3D" parent="." instance=ExtResource("2_xxcha")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.9736039, 0) [node name="InteractionChecker" type="Area3D" parent="."] collision_layer = 0 [node name="CollisionShape3D" type="CollisionShape3D" parent="InteractionChecker"] shape = SubResource("CapsuleShape3D_ideak") [node name="RayCast3D2" parent="." instance=ExtResource("3_kh24r")] [connection signal="body_entered" from="InteractionChecker" to="." method="_on_interaction_checker_body_entered"] [connection signal="body_exited" from="InteractionChecker" to="." method="_on_interaction_checker_body_exited"]