From 42c2344ec004ce6302d5fea9674973ad0d1bcb47 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 30 Sep 2023 23:59:28 +0200 Subject: [PATCH] Update changed things?? --- entity/coin_copper.gd | 5 ----- entity/coin_copper.tscn | 10 ++++------ entity/{coin.tres => coin_physics_material.tres} | 0 project.godot | 4 ++-- spawner/spawner.tscn | 4 ++-- 5 files changed, 8 insertions(+), 15 deletions(-) delete mode 100644 entity/coin_copper.gd rename entity/{coin.tres => coin_physics_material.tres} (100%) diff --git a/entity/coin_copper.gd b/entity/coin_copper.gd deleted file mode 100644 index b4db63b..0000000 --- a/entity/coin_copper.gd +++ /dev/null @@ -1,5 +0,0 @@ -extends RigidBody2D -class CoinCopper - - -func _integrate_forces(state: PhysicsDirectBodyState2D): diff --git a/entity/coin_copper.tscn b/entity/coin_copper.tscn index 572b778..a788a5f 100644 --- a/entity/coin_copper.tscn +++ b/entity/coin_copper.tscn @@ -1,22 +1,20 @@ -[gd_scene load_steps=6 format=3 uid="uid://c3kitncwpi42j"] +[gd_scene load_steps=5 format=3 uid="uid://c3kitncwpi42j"] -[ext_resource type="PhysicsMaterial" uid="uid://c6kn1an85lccr" path="res://entity/coin.tres" id="1_1merf"] +[ext_resource type="PhysicsMaterial" uid="uid://c6kn1an85lccr" path="res://entity/coin_physics_material.tres" id="1_8k46m"] [ext_resource type="Texture2D" uid="uid://dbdkb4vt7dh85" path="res://entity/coin_copper_4.png" id="1_wedw1"] [ext_resource type="Texture2D" uid="uid://2vtvoj6ua3cb" path="res://entity/coin_copper_outline_2.png" id="2_2ifq3"] -[ext_resource type="Script" path="res://entity/coin_copper.gd" id="2_y0e7k"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_c6byl"] -size = Vector2(14, 3) +size = Vector2(16, 5) [node name="CoinCopper" type="RigidBody2D"] collision_layer = 5 collision_mask = 7 inertia = 20000.0 -physics_material_override = ExtResource("1_1merf") +physics_material_override = ExtResource("1_8k46m") continuous_cd = 1 linear_damp = 0.1 angular_damp = 0.1 -script = ExtResource("2_y0e7k") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] scale = Vector2(3, 3) diff --git a/entity/coin.tres b/entity/coin_physics_material.tres similarity index 100% rename from entity/coin.tres rename to entity/coin_physics_material.tres diff --git a/project.godot b/project.godot index c10ccab..81c5e97 100644 --- a/project.godot +++ b/project.godot @@ -36,9 +36,9 @@ window/handheld/orientation=1 2d/run_on_separate_thread=true 2d/solver/solver_iterations=4 -2d/solver/contact_recycle_radius=3.0 +2d/solver/contact_max_separation=1.0 2d/solver/contact_max_allowed_penetration=0.02 -2d/solver/default_contact_bias=0.1 +2d/solver/default_contact_bias=0.0 2d/solver/default_constraint_bias=0.1 [rendering] diff --git a/spawner/spawner.tscn b/spawner/spawner.tscn index b787b2e..b97d4f9 100644 --- a/spawner/spawner.tscn +++ b/spawner/spawner.tscn @@ -9,14 +9,14 @@ size = Vector2(100, 20) script = ExtResource("1_xqfmg") [node name="Timer" type="Timer" parent="."] -wait_time = 0.02 +wait_time = 0.1 autostart = true [node name="Area2D" type="Area2D" parent="."] collision_mask = 4 [node name="Shape" type="CollisionShape2D" parent="Area2D"] -position = Vector2(0, -10) +position = Vector2(0, -15) shape = SubResource("RectangleShape2D_xnebx") [connection signal="timeout" from="Timer" to="." method="spawn"]