mirror of
https://github.com/Sheldan/canvas.git
synced 2026-01-26 03:11:42 +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) {
|
mouseMove(pos: Vector) {
|
||||||
if(this.isPressed()) {
|
if(this.isPressed()) {
|
||||||
let diff = Vector.createVector(pos, this.centerPosition!);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
diff = diff.normalize();
|
diff = diff.normalize();
|
||||||
|
|||||||
Reference in New Issue
Block a user