mirror of
https://github.com/NoelFB/tiny_link.git
synced 2025-02-18 12:58:28 +08:00
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:
parent
f62a60cb3e
commit
957aa8d938
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user