diff --git a/src/components/character-controller.js b/src/components/character-controller.js index 6aeb0797bd212d01b0fce8628205fc46f55291e0..05bb83ff30d85cd3a74cc6fc78cff4ba2e72c6c6 100644 --- a/src/components/character-controller.js +++ b/src/components/character-controller.js @@ -103,7 +103,6 @@ AFRAME.registerComponent("character-controller", { const pivotRotationInvMatrix = new THREE.Matrix4(); const startPos = new THREE.Vector3(); const startScale = new THREE.Vector3(); - const jump = new THREE.Vector3(); return function(t, dt) { const deltaSeconds = dt / 1000; @@ -125,13 +124,6 @@ AFRAME.registerComponent("character-controller", { if (userinput.readFrameValueAtPath(paths.actions.snapRotateRight)) { this.snapRotateRight(); } - jump.set(0, 0, 0); - if (userinput.readFrameValueAtPath(paths.actions.translate.up)) { - jump.y += userinput.readFrameValueAtPath(paths.actions.translate.up); - } - if (userinput.readFrameValueAtPath(paths.actions.translate.down)) { - jump.y -= userinput.readFrameValueAtPath(paths.actions.translate.down); - } const acc = userinput.readFrameValueAtPath(paths.actions.characterAcceleration); if (acc) { this.accelerationInput.set(acc[0], 0, acc[1]); @@ -149,9 +141,9 @@ AFRAME.registerComponent("character-controller", { const boost = userinput.readFrameValueAtPath(paths.actions.boost) ? 2 : 1; move.makeTranslation( - jump.x + this.velocity.x * distance * boost, - jump.y + this.velocity.y * distance * boost, - jump.z + this.velocity.z * distance * boost + this.velocity.x * distance * boost, + this.velocity.y * distance * boost, + this.velocity.z * distance * boost ); yawMatrix.makeRotationAxis(rotationAxis, rotationDelta); diff --git a/src/systems/userinput/bindings/xbox-controller-user.js b/src/systems/userinput/bindings/xbox-controller-user.js index 460f3b1f50cc9876680fe111e86da950a3741466..b9d230a799ca5515615abc24318ac9507e779b6d 100644 --- a/src/systems/userinput/bindings/xbox-controller-user.js +++ b/src/systems/userinput/bindings/xbox-controller-user.js @@ -161,16 +161,6 @@ export const xboxControllerUserBindings = { dest: { value: paths.actions.snapRotateRight }, xform: xforms.rising }, - { - src: { value: button("dpadUp").pressed }, - dest: { value: paths.actions.translate.up }, - xform: xforms.scale(0.1) - }, - { - src: { value: button("dpadDown").pressed }, - dest: { value: paths.actions.translate.down }, - xform: xforms.scale(0.1) - }, { dest: { value: "var/vec2/zero" }, xform: xforms.vec2Zero diff --git a/src/systems/userinput/paths.js b/src/systems/userinput/paths.js index d4cc4994c7231a133d156ba116dfcf671464fb7a..9ec46049120e0e12a77010b5146e2e9f33f24db3 100644 --- a/src/systems/userinput/paths.js +++ b/src/systems/userinput/paths.js @@ -11,11 +11,6 @@ paths.actions.characterAcceleration = "/actions/characterAcceleration"; paths.actions.boost = "/actions/boost"; paths.actions.startGazeTeleport = "/actions/startTeleport"; paths.actions.stopGazeTeleport = "/actions/stopTeleport"; -paths.actions.translate = {}; -paths.actions.translate.forward = "/actions/translate/forward"; -paths.actions.translate.backward = "/actions/translate/backward"; -paths.actions.translate.up = "/actions/translate/up"; -paths.actions.translate.down = "/actions/translate/down"; paths.actions.spawnPen = "/actions/spawnPen"; paths.actions.cursor = {}; paths.actions.cursor.pose = "/actions/cursorPose";