From a865c58188958559e8dc2d91059adac0dbb4cd20 Mon Sep 17 00:00:00 2001 From: Logan Date: Sat, 24 Sep 2022 20:37:10 -0600 Subject: Improved hoop collision. --- scenes/hoop.tscn | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'scenes/hoop.tscn') diff --git a/scenes/hoop.tscn b/scenes/hoop.tscn index c7e6d47..15c10ce 100644 --- a/scenes/hoop.tscn +++ b/scenes/hoop.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=6 format=2] [ext_resource path="res://textures/hoop_fore.png" type="Texture" id=1] [ext_resource path="res://textures/hoop_back.png" type="Texture" id=2] @@ -9,11 +9,7 @@ a = Vector2( 5.8, -12.4 ) b = Vector2( -4.6, 11.4 ) [sub_resource type="RectangleShape2D" id=2] -extents = Vector2( 9.9, 0.55 ) - -[sub_resource type="SegmentShape2D" id=3] -a = Vector2( -4.4, -1 ) -b = Vector2( 17.4, -1 ) +extents = Vector2( 6.3, 0.55 ) [node name="Hoop" type="StaticBody2D"] scale = Vector2( 5, 5 ) @@ -42,13 +38,15 @@ polygon = PoolVector2Array( 0.762794, -5.14728, 5.32917, 3.9975, 2.25312, 4.9326 [node name="Area2D" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -position = Vector2( -12.6, 10.75 ) +position = Vector2( -12.7, 10.75 ) +scale = Vector2( 1, 1 ) shape = SubResource( 2 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( -6.2, 11.8 ) +[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="."] +position = Vector2( -12.5, 14.4 ) rotation = 3.14159 -shape = SubResource( 3 ) +scale = Vector2( 1, 1 ) +polygon = PoolVector2Array( 10.9, 3.20002, -11.1, 3.19997, -8.49998, -3.60003, 7.50002, -3.59999 ) one_way_collision = true [connection signal="body_exited" from="Area2D" to="." method="_on_Area2D_body_exited"] -- cgit v1.2.3