private void MoveUpdate() { controllerState.Update(); float h = Input.GetAxisRaw("Horizontal"); float v = Input.GetAxisRaw("Vertical"); Transform camTransform = Camera.main.transform; movement = camTransform.forward * v + camTransform.right * h; //movement.y = 0.0f; //if (myBody.velocity.magnitude < moveSpeed) // movement = movement.normalized * moveForce; //else // movement = Vector3.zero; // Different way of doing jump/ground check //IsGrounded = false; //RaycastHit groundRayHit; //Ray groundRay = new Ray(transform.position, Vector3.down); //if ( Physics.Raycast(groundRay, out groundRayHit, height*0.6f, groundLayer) ) { // IsGrounded = true; //} //if (brake && movement.magnitude < 0.001f && IsGrounded) { // movement = -myBody.velocity * brakeRate; //} //if (!IsGrounded) // movement.y += extraGravity; if (!_jump && groundedComponent.IsGrounded && Input.GetButtonDown("Jump")) { _jump = true; //Events.Fire(ThirdPersonControllerEvent.Jump, null); } }