give SG those GRIPPY SHOES OH MY GOODNESS, they can now stop freaking out on the edge of platforms... IN STYEL

This commit is contained in:
Haze Weathers 2023-03-07 23:07:38 -05:00
parent d74c82cd56
commit 1fa0fa44ed
2 changed files with 13 additions and 4 deletions

View file

@ -151,10 +151,8 @@ func _process_fall():
#Cant move in air
if !can_move_in_air: velocity.x = 0
#Corner collision
func _process_idle_fall():
if is_on_wall():
position.x += get_last_slide_collision().normal.x * 0.1
pass
func _process_jump_fall():
check_double_jump()

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=33 format=2]
[gd_scene load_steps=34 format=2]
[ext_resource path="res://objects/player/player.gd" type="Script" id=1]
[ext_resource path="res://graphics/player/sg_walk.png" type="Texture" id=2]
@ -35,6 +35,9 @@ extents = Vector2( 2.5, 5 )
[sub_resource type="RectangleShape2D" id=39]
extents = Vector2( 2.5, 5 )
[sub_resource type="RayShape2D" id=44]
length = 1.0
[sub_resource type="Animation" id=29]
resource_name = "climb"
length = 0.3
@ -642,6 +645,14 @@ shape = SubResource( 6 )
position = Vector2( 0.5, 5 )
shape = SubResource( 39 )
[node name="CollisionShape2D2" type="CollisionShape2D" parent="." groups=["sword"]]
position = Vector2( 3, 9 )
shape = SubResource( 44 )
[node name="CollisionShape2D3" type="CollisionShape2D" parent="." groups=["sword"]]
position = Vector2( -2, 9 )
shape = SubResource( 44 )
[node name="ClimbRay" type="RayCast2D" parent="."]
position = Vector2( 0.5, 10 )
enabled = true