Skip to content

Commit

Permalink
Merge pull request #667 from engaging-computing/verticalMovementFixMa…
Browse files Browse the repository at this point in the history
…ster

Vertical Movement Fix for Master
  • Loading branch information
jf-kelly committed Mar 21, 2023
2 parents b376c45 + 146c615 commit 3e61b10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/structural/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ class View extends Component {
* @returns {HTMLElement} A-Frame camera elements with basic movement
*/
basicMoveCam = () => {
let realSpeed = (this.props.sceneConfig.settings.moveSpeed / 10) + 10;
let realVertSpeed = (this.props.sceneConfig.settings.moveSpeed / 2) + 10;
let realHorizontalSpeed = (this.props.sceneConfig.settings.moveSpeed / 10) + 10;
switch(browserType()) {
case "mobile":
return (
Expand Down Expand Up @@ -347,7 +348,8 @@ class View extends Component {
<a-camera
position={this.props.sceneConfig.settings.cameraPosition}
look-controls="pointerLockEnabled: true"
wasd-controls={`acceleration: ${realSpeed}`}>
wasd-plus-controls={`acceleration: ${realVertSpeed}`}
wasd-controls={`acceleration: ${realHorizontalSpeed}`}>
<a-cursor
raycaster="objects:.raycastable"
position="0 0 -1"
Expand Down

0 comments on commit 3e61b10

Please sign in to comment.