🚧 WIP detection works now
This commit is contained in:
@@ -2,19 +2,20 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://ccc6m6c5khd2x" path="res://scripts/CSharp/Common/CharacterControls/DetectionCross.cs" id="1_va8tx"]
|
||||
[ext_resource type="PackedScene" uid="uid://dugr6ff1g7hi0" path="res://prefabs/interactions/detector.tscn" id="2_8hh05"]
|
||||
[ext_resource type="Script" uid="uid://b4n0nlu4ckqga" path="res://scripts/CSharp/Common/CharacterControls/RaycastDetector.cs" id="2_va8tx"]
|
||||
|
||||
[node name="DetectionCross" type="Node2D" node_paths=PackedStringArray("_collider", "_detector")]
|
||||
position = Vector2(0, 1)
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_va8tx"]
|
||||
|
||||
[node name="DetectionCross" type="Node2D" node_paths=PackedStringArray("_collider", "_shapeCast2D")]
|
||||
script = ExtResource("1_va8tx")
|
||||
_collider = NodePath("detector")
|
||||
_detector = NodePath("Raycast")
|
||||
_shapeCast2D = NodePath("ShapeCast2D")
|
||||
_xOffset = 200.0
|
||||
_yOffset = 200.0
|
||||
|
||||
[node name="Raycast" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(222, -168)
|
||||
collide_with_areas = true
|
||||
script = ExtResource("2_va8tx")
|
||||
[node name="detector" parent="." node_paths=PackedStringArray("_shapeCast2D") instance=ExtResource("2_8hh05")]
|
||||
_shapeCast2D = NodePath("../ShapeCast2D")
|
||||
|
||||
[node name="detector" parent="." instance=ExtResource("2_8hh05")]
|
||||
[node name="ShapeCast2D" type="ShapeCast2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_va8tx")
|
||||
target_position = Vector2(200, 0)
|
||||
collide_with_areas = true
|
||||
|
||||
Reference in New Issue
Block a user