mirror of
https://github.com/NoelFB/tiny_link.git
synced 2025-07-05 20:45:25 +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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user