백지부터 시작하는 이세계 코딩 생활
MovePosition 본문
RigidBody . MovePosition (Vector3 position)
target 지점이 되는 position 으로 RigidBody를 이동시킨다.
transform.position 보다 RigidBody.MovePosition 이 더 부드럽게 움직이게 해준다. ( RigidBody의 Interpolate 옵션 때문 ) ( Ref. egloos.zum.com/metashower/v/9660975 )
private void Move()
{
rb.MovePosition(rb.position + moveVector * fMoveSpeed * Time.fixedDeltaTime);
}
Ref.
Rigidbody.MovePosition과 transform.position의 차이점
RigidBody가 달린 GameObject를 이동하는 방법엔 세 종류가 있다. 1. transform.position 2. RigidBody.position 3. RigidBody.MovePosition() # 일단 transform.position과 RigidBody.position는 순간이동 식으..
themestock7.tistory.com
RigidBody.MovePosition()
1. 이동 출발 지점과 끝지점을 직선으로 연결한 경로를 매우 빠르게 이동한다.
2. 중간에 다른 rigidbody가 있을 경우 밀어내는 등의 물리처리를 한다.
[Unity] MovePosition과 position 의 차이
유니티에서 오브젝트를 이동시키는 경우는 3가지가 있다. 1.Transform.position 을 이용해서 움직이는 경우 2.RigidBody.position 을 이용해서 움직이는 경우 3.RigidBody.MovePosition() 을 이용해서 움직이는 경..
cajava.tistory.com
1.Transform.position 을 이용해서 움직이는 경우 --> 아주 부득이한 상황에 순간이동을 하고싶을 때
2.RigidBody.position 을 이용해서 움직이는 경우 --> 순간이동을 하지만 성능도 좋게 하고싶을 때
3.RigidBody.MovePosition() 을 이용해서 움직이는 경우 --> 순간이동이 아닌 진짜 움직임을 묘사하고싶을 때
'백지부터 시작하는 이세계 유니티 생활 since 2020' 카테고리의 다른 글
eulerAngles (0) | 2020.11.18 |
---|---|
Mathf, Radian, Degree, Lerp (0) | 2020.11.18 |
Quaternion, LookRotation, Normalize (0) | 2020.11.18 |
Rotation, Rotate (0) | 2020.11.18 |
GetComponentInChildren, GetComponentsInChildren (0) | 2020.11.18 |
Comments