Use Vec2f for orb's diff

At the moment it's a Vec2i so normal() will always return (0, 0).
This commit is contained in:
Fab 2023-02-19 10:51:15 +00:00
parent f62a60cb3e
commit 957aa8d938

View File

@ -22,7 +22,7 @@ Point Orb::target() const
void Orb::update()
{
auto mover = get<Mover>();
auto diff = Vec2(target() - entity()->position).normal();
auto diff = Vec2f(target() - entity()->position).normal();
mover->speed = diff * speed;
}