1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-25 17:14:20 +00:00

Configure coin physics properties

This commit is contained in:
Steffo 2023-09-30 19:24:28 +02:00
parent 00018399b7
commit 441cc9ffd5
Signed by: steffo
GPG key ID: 2A24051445686895
2 changed files with 9 additions and 4 deletions

5
entity/coin.tres Normal file
View file

@ -0,0 +1,5 @@
[gd_resource type="PhysicsMaterial" format=3 uid="uid://c6kn1an85lccr"]
[resource]
rough = true
bounce = 0.3

View file

@ -1,19 +1,19 @@
[gd_scene load_steps=5 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="Texture2D" uid="uid://dbdkb4vt7dh85" path="res://entity/coin_copper_4.png" id="1_wedw1"] [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="Texture2D" uid="uid://2vtvoj6ua3cb" path="res://entity/coin_copper_outline_2.png" id="2_2ifq3"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_06g2i"]
bounce = 0.1
[sub_resource type="RectangleShape2D" id="RectangleShape2D_c6byl"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_c6byl"]
size = Vector2(14, 3) size = Vector2(14, 3)
[node name="CoinCopper" type="RigidBody2D"] [node name="CoinCopper" type="RigidBody2D"]
collision_layer = 5 collision_layer = 5
collision_mask = 7 collision_mask = 7
physics_material_override = SubResource("PhysicsMaterial_06g2i") physics_material_override = ExtResource("1_1merf")
continuous_cd = 1 continuous_cd = 1
linear_damp = 0.1
angular_damp = 0.1
[node name="Outline" type="Sprite2D" parent="."] [node name="Outline" type="Sprite2D" parent="."]
z_index = -10 z_index = -10