mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
fix jumps with desiredCenter
This commit is contained in:
@@ -514,6 +514,7 @@ export class Camera extends BasicSerializableObject {
|
|||||||
if (mousePosition) {
|
if (mousePosition) {
|
||||||
const worldPos = this.root.camera.screenToWorld(mousePosition);
|
const worldPos = this.root.camera.screenToWorld(mousePosition);
|
||||||
let de = worldPos.sub(this.center);
|
let de = worldPos.sub(this.center);
|
||||||
|
this.desiredCenter = null;
|
||||||
this.center = this.center.add(de.multiplyScalar(delta));
|
this.center = this.center.add(de.multiplyScalar(delta));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user