Change how ticking works
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { PlayerInfo } from "$/common/protocol.ts";
|
||||
import { TICK_DELTA } from "$/common/constants.ts";
|
||||
import type { ClientLevel } from "../level/client_level.ts";
|
||||
import { Player } from "./player.ts";
|
||||
|
||||
@@ -32,8 +33,8 @@ export class RemotePlayer extends Player {
|
||||
this.pitch = pitch;
|
||||
}
|
||||
|
||||
tick(delta: number) {
|
||||
const t = Math.min(1, delta * SMOOTHING);
|
||||
tick() {
|
||||
const t = Math.min(1, TICK_DELTA * SMOOTHING);
|
||||
this.x += (this.target_x - this.x) * t;
|
||||
this.y += (this.target_y - this.y) * t;
|
||||
this.z += (this.target_z - this.z) * t;
|
||||
|
||||
Reference in New Issue
Block a user