a-maze-ing
This commit is contained in:
@@ -82,7 +82,7 @@ export class CharacterControls {
|
||||
this.directionVelocity = this.directionVelocity * 2.5 * Math.abs(input[0])
|
||||
this.direction += input[0] * delta * 2.5 //this.directionVelocity;
|
||||
this.model.rotation.y = this.direction;
|
||||
this.walkDirection.set(input[0], 0, input[1])
|
||||
this.walkDirection.set(input[0]*0.33, 0, input[1])
|
||||
this.walkDirection.applyAxisAngle(this.rotateAngle, this.direction)
|
||||
this.walkDirection.normalize();
|
||||
|
||||
@@ -127,11 +127,13 @@ export class CharacterControls {
|
||||
|
||||
cameraPosition.lerp(cameraDesiredPosition, delta*2)
|
||||
this.camera.position.copy(cameraPosition)
|
||||
this.camera.lookAt(new THREE.Vector3(
|
||||
this.model.position.x,
|
||||
2,
|
||||
this.model.position.z
|
||||
))
|
||||
// this.camera.lookAt(new THREE.Vector3(
|
||||
// this.model.position.x,
|
||||
// 2,
|
||||
// this.model.position.z
|
||||
// ))
|
||||
this.orbitControl.target.set(this.model.position.x, 2, this.model.position.z)
|
||||
this.camera.lookAt(this.orbitControl.target)
|
||||
}
|
||||
|
||||
getInput(pointerControls) {
|
||||
|
||||
Reference in New Issue
Block a user