![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/dyrXQZ/btrLvKjuNuL/Mirb6xRv0QP5PJnhGyBUT0/img.png)
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerBall : MonoBehaviour { public float jumpPower = 10; Rigidbody rigid; private void Awake() { rigid = GetComponent(); } private void Update() { if (Input.GetButtonDown("Jump")) { rigid.AddForce(new Vector3(0, jumpPower, 0), ForceMode.Impulse); } } private void FixedUpdate() { float h = Input.GetAxisRa..
프로그래밍/유니티
2022. 9. 6. 07:10