mirror of
https://github.com/Sheldan/canvas.git
synced 2026-01-01 14:58:51 +00:00
survivors: dont limit the movement area of the control to make it more useful
This commit is contained in:
@@ -88,7 +88,7 @@ export class Controls implements DrawContainer, MouseInterActingContainer {
|
||||
mouseMove(pos: Vector) {
|
||||
if(this.isPressed()) {
|
||||
let diff = Vector.createVector(pos, this.centerPosition!);
|
||||
if(diff.vecLength() > this.size && !isNaN(diff.x) && !isNaN(diff.y)) {
|
||||
if(!isNaN(diff.x) && !isNaN(diff.y)) {
|
||||
return;
|
||||
}
|
||||
diff = diff.normalize();
|
||||
|
||||
Reference in New Issue
Block a user