diff --git a/main.js b/main.js index ba44f71..f29da22 100644 --- a/main.js +++ b/main.js @@ -10,7 +10,7 @@ import Stats from 'three/addons/libs/stats.module.js' import MazeMesh from './MazeMesh.js' -const playerHeight = 0.5 +const playerHeight = 0.45 const mazeWidth = 23 const parameters = { @@ -652,6 +652,7 @@ function updatePlayer(deltaTime) { playerCollider.translate(deltaPosition) camera.position.copy(playerCollider.end) + camera.position.y += 0.018 * Math.cos(4 * camera.position.x) + 0.018 * Math.cos(4 * camera.position.z) playerCollisions() } diff --git a/three-player-controller b/three-player-controller new file mode 160000 index 0000000..c1f16cd --- /dev/null +++ b/three-player-controller @@ -0,0 +1 @@ +Subproject commit c1f16cde3e545db4943c6f950e19d7d06cc8f46c