ernamed radialvelocity to angularvelocity
This commit is contained in:
parent
b5a9772248
commit
2dd3aff737
|
|
@ -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)}`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export type ObjectInstance = {
|
|||
|
||||
export type GameObjectData = {
|
||||
linearVelocity: V3;
|
||||
radialVelocity: R3;
|
||||
angularVelocity: R3;
|
||||
}
|
||||
|
||||
export type GameObjectInstance = ObjectInstance & GameObjectData;
|
||||
|
|
|
|||
Loading…
Reference in New Issue