mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 11:43:19 +08:00
Fixes
This commit is contained in:
@ -46,8 +46,8 @@ class MyGame extends Game with MouseMovementDetector {
|
||||
_onTarget = _toRect().contains(target.toOffset());
|
||||
|
||||
if (!_onTarget) {
|
||||
final dir = (target - position).normalize();
|
||||
position += dir * (SPEED * dt);
|
||||
final dir = (target - position).normalized();
|
||||
position += (SPEED * dt) * dir;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user