Periodic boundary now applies to prey too

This commit is contained in:
Martin committed 2026-01-02 13:17:55 +01:00
1 parent 3262a8899c
commit 4160361145
5 files changed
+32 -15

No files matched your search

@@ -16,8 +16,11 @@ func _process(delta: float) -> void:
func _physics_process(delta: float) -> void:
self.move(Vector3(randfn(0, 1), randfn(0, 1), 0))
func move(destination: Vector3) -> void:
move_and_collide(Vector2(destination.x, destination.y))
func move(motion: Vector3) -> void:
move_and_collide(Vector2(motion.x, motion.y)) # Moves along the given vector
# Apply boundary to new position
position = GameManager.get_boundaried_position(position)
func die() -> void:
sprite.play("Dying")
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.