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) {
|
private withoutAutoSave(fn: () => void) {
|
||||||
this._stopAutoSave();
|
this._stopAutoSave();
|
||||||
fn();
|
fn();
|
||||||
|
|
@ -100,7 +102,7 @@ export class GameState {
|
||||||
public setCharacterTransform(
|
public setCharacterTransform(
|
||||||
transform: Pos3,
|
transform: Pos3,
|
||||||
linearVelocity?: V3,
|
linearVelocity?: V3,
|
||||||
radialVelocity?: R3,
|
angularVelocity?: R3,
|
||||||
): void {
|
): void {
|
||||||
if (this.isPaused)
|
if (this.isPaused)
|
||||||
return;
|
return;
|
||||||
|
|
@ -108,8 +110,8 @@ export class GameState {
|
||||||
this.scene.character.transform = transform;
|
this.scene.character.transform = transform;
|
||||||
if (linearVelocity)
|
if (linearVelocity)
|
||||||
this.scene.character.linearVelocity = linearVelocity;
|
this.scene.character.linearVelocity = linearVelocity;
|
||||||
if (radialVelocity)
|
if (angularVelocity)
|
||||||
this.scene.character.radialVelocity = radialVelocity;
|
this.scene.character.angularVelocity = angularVelocity;
|
||||||
|
|
||||||
// console.log(`changed character to ${JSON.stringify(this.scene.character)}`);
|
// console.log(`changed character to ${JSON.stringify(this.scene.character)}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export type ObjectInstance = {
|
||||||
|
|
||||||
export type GameObjectData = {
|
export type GameObjectData = {
|
||||||
linearVelocity: V3;
|
linearVelocity: V3;
|
||||||
radialVelocity: R3;
|
angularVelocity: R3;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GameObjectInstance = ObjectInstance & GameObjectData;
|
export type GameObjectInstance = ObjectInstance & GameObjectData;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue