Closed Oleh-Halitskiy closed 2 years ago
void GetInput() { jumpInput = Input.GetButton("Jump"); xInput = Input.GetAxisRaw("Horizontal"); yInput = Input.GetAxisRaw("Vertical"); movementVector = transform.forward yInput + transform.right xInput; moveDirection = Vector3.SmoothDamp(moveDirection, movementVector.normalized, ref moveVelocity, vel);
} this could be used as start
characterController.Move(moveDirection movementSpeed Time.deltaTime);
void GetInput() { jumpInput = Input.GetButton("Jump"); xInput = Input.GetAxisRaw("Horizontal"); yInput = Input.GetAxisRaw("Vertical"); movementVector = transform.forward yInput + transform.right xInput; moveDirection = Vector3.SmoothDamp(moveDirection, movementVector.normalized, ref moveVelocity, vel);