From 4e986ccda2a8c7aaebe65aeeced10f3cde97c22f Mon Sep 17 00:00:00 2001 From: leia_uwu Date: Wed, 13 Sep 2023 17:55:37 -0300 Subject: [PATCH] fix: fix rotation smoothing --- client/src/scripts/types/gameObject.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/client/src/scripts/types/gameObject.ts b/client/src/scripts/types/gameObject.ts index bacea03db..733e18bc9 100644 --- a/client/src/scripts/types/gameObject.ts +++ b/client/src/scripts/types/gameObject.ts @@ -2,12 +2,12 @@ import { type Game } from "../game"; import { type ObjectsNetData } from "../../../../common/src/utils/objectsSerializations"; import { type ObjectType } from "../../../../common/src/utils/objectType"; -import { vClone, type Vector } from "../../../../common/src/utils/vector"; +import { v, vClone, type Vector } from "../../../../common/src/utils/vector"; import { type ObjectCategory, TICK_SPEED } from "../../../../common/src/constants"; import { type ObjectDefinition } from "../../../../common/src/utils/objectDefinitions"; import { Container, Graphics } from "pixi.js"; import { type Sound } from "../utils/soundManager"; -import { lerp, vecLerp } from "../../../../common/src/utils/math"; +import { vecLerp } from "../../../../common/src/utils/math"; import { toPixiCoords } from "../utils/pixi"; import { HITBOX_DEBUG_MODE } from "../utils/constants"; @@ -40,20 +40,27 @@ export abstract class GameObject