inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

성연철님의 게시글

성연철 성연철

@skqkqh7770451

수강평 작성수
-
평균평점
-

게시글 3

질문&답변

if (CharacterController.isGrounded) currentVelocityY = 0f;

아 너무 감사합니다 ㅠㅠ 대문자 소문자 하나에도 이렇게 바뀌는거 보면 너무 어렵긴 하네요ㅠㅠ.. 개인시간 까지 할애해서 도와주셔서 너무 감사합니다 ㅠㅠ

좋아요수
0
댓글수
6
조회수
563

질문&답변

if (CharacterController.isGrounded) currentVelocityY = 0f;

어떤 개체를 선언해야 할까요? 영상에서 나온 그대로 따라가고 있는데 오류가 떠서 너무 난감하네요 ㅠㅠ public void Move(Vector2 moveInput) { var targetSpeed = speed * moveInput.magnitude; var moveDierction = Vector3.Normalize(transform.forward * moveInput.y + transform.right * moveInput.x); var smoothTime = characterController.isGrounded ? speedSmoothTime : speedSmoothTime / airControlPercent; targetSpeed = Mathf.SmoothDamp(currentSpeed, targetSpeed, ref speedSmoothVelocity, smoothTime); currentVelocityY += Time.deltaTime * Physics.gravity.y; var velocity = moveDierction * targetSpeed + Vector3.up * currentVelocityY; characterController.Move(velocity * Time.deltaTime); if (CharacterController.isGrounded) currentVelocityY = 0f; 여기서 맨 아랫줄이 오류가 나고있습니다..

좋아요수
0
댓글수
6
조회수
563