Prey is now reflected to be smooth across periodic boundary too

This commit is contained in:
2026-01-02 22:03:29 +01:00
parent 4160361145
commit 8de3ee2c9a
4 changed files with 113 additions and 3 deletions

View File

@@ -1,6 +1,10 @@
extends Node
var screen_size = Vector2(1920.0, 1080.0) # Default screen size (this is a float for some reason)
var viewport_size
func _ready() -> void:
viewport_size = get_viewport().get_visible_rect().size
# TODO: This needs to be called from a script inheriting a CharacterBody2D (e.g. the player)
# Alternative would be to pass the player reference to this script (which might be better?)