Godot Version
4.7
Question
Im trying to make one way spikes in godot, but it won’t work. I tried setting the collisionShape2D to oneway but that doesn’t work. I have a basic kill_zone script. Using tileset for the spike sprite
extends Area2D
func _on_body_entered(body: Node2D) -> void:
$Timer.start()
Engine.time_scale = 0.5
body.get_node("CollisionShape2D").queue_free()
func _on_timer_timeout() -> void:
Engine. time_scale = 1.0
get_tree().call_deferred("reload_current_scene")
queue_free()