Unity 회전력1 [Unity] 12. 물리 영향을 받는 게임 오브젝트 이동 컴포넌트 가져오기 - GetComponent : 자신의 T타입 컴포넌트를 가져옴 using System.Collections; using System.Collections.Generic; using UnityEngine; public class MyBall : MonoBehaviour { Rigidbody rigid; void Start() { rigid = GetComponent(); } } 물체 속도 설정으로 이동 - velocity : 현재 이동 속도 - RigidBody 관련 코드는 FixedUpdate에 작성 (일반 Update 함수에 X) using System.Collections; using System.Collections.Generic; using UnityEngine; public c.. 2022. 7. 10. 이전 1 다음 반응형