skqkqh7770451
@skqkqh7770451
Reviews Written
-
Average Rating
-
Posts
Q&A
if (CharacterController.isGrounded) currentVelocityY = 0f;
์ ๋๋ฌด ๊ฐ์ฌํฉ๋๋ค ใ ใ ๋๋ฌธ์ ์๋ฌธ์ ํ๋์๋ ์ด๋ ๊ฒ ๋ฐ๋๋๊ฑฐ ๋ณด๋ฉด ๋๋ฌด ์ด๋ ต๊ธด ํ๋ค์ใ ใ .. ๊ฐ์ธ์๊ฐ ๊น์ง ํ ์ ํด์ ๋์์ฃผ์ ์ ๋๋ฌด ๊ฐ์ฌํฉ๋๋ค ใ ใ
- 0
- 6
- 490
Q&A
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
- 490
Q&A
if (CharacterController.isGrounded) currentVelocityY = 0f;
CharacterController.isGrounded ์ด ๋ถ๋ถ์ด ์ค๋ฅ๊ฐ ๋ฉ๋๋ค.
- 0
- 6
- 490




