Fixed test platform rotation. Added standing check area to the platform

This commit is contained in:
2026-06-20 14:43:34 +03:00
parent 24481b1f33
commit 6bfe08e76c
4 changed files with 16 additions and 8 deletions
+3 -2
View File
@@ -36,6 +36,7 @@ const MAX_WIDTH = TILE_SIZE * 32
@onready var collision: CollisionShape2D = $CollisionShape2D
@onready var standing_check_collision: CollisionShape2D = $Area2D/CollisionShape2D
@onready var sub_viewport: SubViewport = $SubViewport
@onready var platform_sprite: Sprite2D = $Sprite2D
@onready var platform_rect: ColorRect = $SubViewport/PlatformRect
@@ -50,8 +51,8 @@ func _ready() -> void:
func rebuild_platform() -> void:
var shape := collision.shape as RectangleShape2D
shape.size.x = platform_width
collision.shape.size.x = platform_width
standing_check_collision.shape.size.x = platform_width - 4
var platfor_size := Vector2(platform_width, TILE_SIZE)