From 957aa8d9382e56643985074e7745870c006d1bfd Mon Sep 17 00:00:00 2001 From: Fab Date: Sun, 19 Feb 2023 10:51:15 +0000 Subject: [PATCH] Use Vec2f for orb's diff At the moment it's a Vec2i so normal() will always return (0, 0). --- src/components/orb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/orb.cpp b/src/components/orb.cpp index 0faf6dc..85dde2f 100644 --- a/src/components/orb.cpp +++ b/src/components/orb.cpp @@ -22,7 +22,7 @@ Point Orb::target() const void Orb::update() { auto mover = get(); - auto diff = Vec2(target() - entity()->position).normal(); + auto diff = Vec2f(target() - entity()->position).normal(); mover->speed = diff * speed; }