Plane 오브젝트에 캐릭터 올려둔 모습임.

지금은 땅에 잘 붙어있는 모습임.

viewimage.php?id=2abcdd23dad63db0&no=24b0d769e1d32ca73ce98ffa1bd625317b1751a89bcfedf2a693cb6508990752fea82cf12f4c949c3375fa1e3e39c85bc5c1444a5f19efb07267a9b80ffd51ea886e55ba9d


시작만 하면 공중으로 붕 뜸

viewimage.php?id=2abcdd23dad63db0&no=24b0d769e1d32ca73ce98ffa1bd625317b1751a89bcfedf2a693cb6508990752fea82cf12f4c949c3375fa1e3e39c85bc5c1444a5f19efb07267a9bd01ae51e6f106ec5945


아래는 스크립트임

using UnityEngine; using UnityEngine.Animations; public class PlayerMovement : MonoBehaviour { Vector3 direction; Vector3 velocity; Animator anim; CharacterController cc; public float speed; public Transform cameraTransform; // 카메라 Transform public float jumpHeight = 2f; // 점프 높이 설정 private void Start() { velocity.y = 0f; anim = GetComponent<Animator>(); cc = GetComponent<CharacterController>(); } private void Update() { if (cc.isGrounded) { float horizontal = Input.GetAxis("Horizontal"); float vertical = Input.GetAxis("Vertical"); direction = new Vector3(horizontal, 0f, vertical).normalized; Vector3 cameraForward = cameraTransform.forward; Vector3 cameraRight = cameraTransform.right; cameraForward.y = 0f; cameraRight.y = 0f; Vector3 moveDirection = direction.x * cameraRight + direction.z * cameraForward; velocity = moveDirection * speed; if (velocity != Vector3.zero) { transform.rotation = Quaternion.LookRotation(velocity); anim.SetBool("isWalking", true); } else { anim.SetBool("isWalking", false); } } velocity.y += Physics.gravity.y * Time.deltaTime; cc.Move(velocity * Time.deltaTime); } }



Radius,Height 줄이니까 공중에 뜨지는 않는데 이래도 되는건가여?

ac5939a70001b942813e33669735c1bcc2a977c21c773585f0dabed5e42e074dc2d2542d4fa4fd2bcaa114c2d1971e9e8479c5c793d7790d2808ad7c5ddfdf0e03aa59cfb6bd67d8c38ed982498e

글고 저 빨간테두리는 뭔가요?