From 3864513cf3cbef6f6fae774e3dfb20908db3e635 Mon Sep 17 00:00:00 2001 From: Luna Brovchuk Date: Sat, 30 Sep 2023 20:01:53 +0200 Subject: [PATCH] Change Player Hitbox --- src/models/player/Player.tscn | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/models/player/Player.tscn b/src/models/player/Player.tscn index 6ae7ba3..14e9b52 100644 --- a/src/models/player/Player.tscn +++ b/src/models/player/Player.tscn @@ -1,9 +1,12 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://src/models/player/sprite.png" type="Texture" id=1] [ext_resource path="res://src/models/player/player.gd" type="Script" id=2] [sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 4, 5.5 ) + +[sub_resource type="RectangleShape2D" id=2] extents = Vector2( 7, 11 ) [node name="Player" type="KinematicBody2D"] @@ -13,6 +16,12 @@ script = ExtResource( 2 ) texture = ExtResource( 1 ) centered = false -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( 12, 12 ) +[node name="WallCollision" type="CollisionShape2D" parent="."] +position = Vector2( 12, 17.5 ) shape = SubResource( 1 ) + +[node name="EnemyCollision" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyCollision"] +position = Vector2( 12, 12 ) +shape = SubResource( 2 )