rudimentary collision shape for player character

master
Adrian Pegler 2024-07-12 16:47:00 +02:00
parent d394279be2
commit 5e91ae928c
1 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=3 uid="uid://bguqy4rmdkgcn"] [gd_scene load_steps=16 format=3 uid="uid://bguqy4rmdkgcn"]
[ext_resource type="Texture2D" uid="uid://i8naxj4e757h" path="res://sprites/CharacterSprite.png" id="1_r1rn1"] [ext_resource type="Texture2D" uid="uid://i8naxj4e757h" path="res://sprites/CharacterSprite.png" id="1_r1rn1"]
@ -106,14 +106,20 @@ animations = [{
}], }],
"loop": true, "loop": true,
"name": &"walking", "name": &"walking",
"speed": 5.0 "speed": 8.0
}] }]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_m7kql"]
radius = 41.0
height = 174.0
[node name="player" type="CharacterBody2D"] [node name="player" type="CharacterBody2D"]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_q70xl") sprite_frames = SubResource("SpriteFrames_q70xl")
animation = &"walking" animation = &"falling"
frame_progress = 0.29238 frame_progress = 0.176795
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(9, 7)
shape = SubResource("CapsuleShape2D_m7kql")