Godot Version
v4.7.2.stable.arch_linux [ed1daf0bf]
Question
Hi :3, I’m want to add these “background hills” to my game that you can jump through andget on top of.
I’m doing it with another TileMapLayer.
I was wondering if theres a quick way to setup one way collisions on them.
doing it by hand seems wrong, cause if I change something on the background i then have to move every point of the collider around, any suggestions?
the script on the colliders is just this, it makes the player be able to go down with S key
extends StaticBody2D
@onready var collider: CollisionPolygon2D = get_child(0);
func _ready() -> void:
if collider.one_way_collision == false:
collider.one_way_collision = true;
func _input(event: InputEvent) -> void:
if event.is_action_pressed("crouch"):
collider.disabled = true;
elif event.is_action_released("crouch"):
collider.disabled = false;

