ernamed radialvelocity to angularvelocity

This commit is contained in:
azykov@mail.ru 2026-06-03 20:53:00 +03:00
parent b5a9772248
commit 2dd3aff737
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View File

@ -19,6 +19,8 @@ export class GameState {
);
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
// @ts-ignore
private withoutAutoSave(fn: () => void) {
this._stopAutoSave();
fn();
@ -100,7 +102,7 @@ export class GameState {
public setCharacterTransform(
transform: Pos3,
linearVelocity?: V3,
radialVelocity?: R3,
angularVelocity?: R3,
): void {
if (this.isPaused)
return;
@ -108,8 +110,8 @@ export class GameState {
this.scene.character.transform = transform;
if (linearVelocity)
this.scene.character.linearVelocity = linearVelocity;
if (radialVelocity)
this.scene.character.radialVelocity = radialVelocity;
if (angularVelocity)
this.scene.character.angularVelocity = angularVelocity;
// console.log(`changed character to ${JSON.stringify(this.scene.character)}`);
}

View File

@ -20,7 +20,7 @@ export type ObjectInstance = {
export type GameObjectData = {
linearVelocity: V3;
radialVelocity: R3;
angularVelocity: R3;
}
export type GameObjectInstance = ObjectInstance & GameObjectData;