added a basic ball that properly inverts velocity when colliding with a world boundary. my balls are getting stuck on each other tho

This commit is contained in:
2024-07-23 18:22:05 +02:00
parent 95fe8fbeff
commit 6b0843a725
11 changed files with 255 additions and 10 deletions
+15
View File
@@ -0,0 +1,15 @@
[gd_scene load_steps=4 format=3 uid="uid://sl3jbnopo0yh"]
[ext_resource type="PackedScene" uid="uid://d2r0ip6xy3a2" path="res://balls/ball.tscn" id="1_ffml1"]
[ext_resource type="Texture2D" uid="uid://cxi0fqy5sajh5" path="res://balls/basic/basic.webp" id="2_4dnuc"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_isusp"]
size = Vector2(50, 50)
[node name="Ball" instance=ExtResource("1_ffml1")]
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="0"]
shape = SubResource("RectangleShape2D_isusp")
[node name="Sprite2D" type="Sprite2D" parent="." index="1"]
texture = ExtResource("2_4dnuc")