fpv
This commit is contained in:
@@ -124,6 +124,7 @@ class Hero{
|
|||||||
// this.engine.activeObjects.position.z = -this.camera.position.z;
|
// this.engine.activeObjects.position.z = -this.camera.position.z;
|
||||||
}else if (this.engine.renderer.xr.isPresenting){
|
}else if (this.engine.renderer.xr.isPresenting){
|
||||||
this.cameraMode = 'rotate'
|
this.cameraMode = 'rotate'
|
||||||
|
this.cameraDelta = 0;
|
||||||
this.engine.cameraRig.position.y = - this.engine.camera.position.y;
|
this.engine.cameraRig.position.y = - this.engine.camera.position.y;
|
||||||
this.engine.dashboard.object.position.y = this.engine.camera.position.y;
|
this.engine.dashboard.object.position.y = this.engine.camera.position.y;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -108,13 +108,13 @@ class PointerControls extends EventManager {
|
|||||||
|
|
||||||
get moveAway(){
|
get moveAway(){
|
||||||
return this.kb.KeyT ||
|
return this.kb.KeyT ||
|
||||||
(this.engine.xrController2?.gamepad?.axes[3] < -0.5 && !this.engine.xrController1?.gamepad?.buttons[4]?.pressed)
|
(this.engine.xrController2?.gamepad?.axes[3] < -0.5 && this.engine.xrController1?.gamepad?.buttons[5]?.pressed)
|
||||||
|| false
|
|| false
|
||||||
}
|
}
|
||||||
|
|
||||||
get moveCloser(){
|
get moveCloser(){
|
||||||
return this.kb.KeyG ||
|
return this.kb.KeyG ||
|
||||||
(this.engine.xrController2?.gamepad?.axes[3] > 0.5 && !this.engine.xrController1?.gamepad?.buttons[4]?.pressed )
|
(this.engine.xrController2?.gamepad?.axes[3] > 0.5 && this.engine.xrController1?.gamepad?.buttons[5]?.pressed )
|
||||||
|| false
|
|| false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user