점프 코드
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { public Rigidbody rb; void Start() { rb = GetComponent<Rigidbody>(); } void FixedUpdate() { if (Input.GetButtonDown("Jump")) rb.velocity = new Vector3(0, 10, 0); } }
댓글
댓글 쓰기