Weapon in right hand setting

This commit is contained in:
Daniel Maixner 2023-10-02 12:57:15 +02:00
parent a4434633db
commit e20fd70bf8
2 changed files with 6 additions and 1 deletions

View File

@ -21,6 +21,7 @@ export class Setting {
preferPerformance: false,
showFps: true,
matchServerFps: false,
weaponInRightHand: true,
anisotropic: 16,
exposure: 0.8,
},
@ -137,6 +138,10 @@ export class Setting {
return this.#setting.base.matchServerFps ?? false
}
hasWeaponInRightHand() {
return this.#setting.base.weaponInRightHand ?? true
}
getSensitivity() {
return this.#setting.base.sensitivity ?? 1.0
}

View File

@ -34,7 +34,7 @@ export class World {
const povItem = new THREE.Group()
povItem.name = 'pov-item'
povItem.scale.setScalar(.7)
povItem.position.x = 8
povItem.position.x = (setting.hasWeaponInRightHand() ? 8 : -8)
povItem.position.z = -12
povItem.position.y = -14
camera.add(listener, povItem)