Bandaid-fix freecam signal spam from render loop when nothing changes

This commit is contained in:
Tanish Manku committed 2025-04-22 01:16:26 -07:00
1 parent 82790bcd97
commit 2a8d5faa66
1 file changed
+5 -1
@@ -220,8 +220,12 @@ class FreeCam extends EventDispatcher {
this.updateMovementVector();
}
isStationary() {
return this.moveVector.distanceTo(new Vector3(0, 0, 0)) === 0;
}
update(delta: number) {
if (!this.enabled) {
if (!this.enabled || this.isStationary()) {
return;
}