일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- getItem
- topdown
- className
- 독립변수
- vsCode
- classList
- 자주 사용하는 Quaternion 함수
- 코딩
- setItem
- Event
- 도트
- 연습
- addEventListener
- 픽셀
- 웹스크래핑
- PYTHON
- 종속변수
- euler
- intervals
- Unity
- 탑다운
- jQuery
- 회전
- 2D
- wsl
- 도린이
- click
- Lerp
- javascript
- Quaternion
- Today
- Total
목록Lerp (2)
쫑가 과정

public class MainCameraController : MonoBehaviour { [SerializeField] Transform player; private void LateUpdate() { Vector3 targetPos = new Vector3(player.position.x, player.position.y, this.transform.position.z); transform.position = targetPos; } } 카메라가 따라갈 위치 변수를 만들어주고, 카메라 위치를 위치 변수로 설정하면 된다. 중요한 건 LateUpdate메서드를 사용해야 한다는 것이다. 플레이어가 움직이면 위치가 변경되는데 카메라 위치도 같은 프레임에 변경되게 하면 카메라 위치가 버벅된다. 플레이어 위치가..

Quaternion.Slerp https://docs.unity3d.com/ScriptReference/Quaternion.Slerp.html Unity - Scripting API: Quaternion.Slerp Use this to create a rotation which smoothly interpolates between the first quaternion a to the second quaternion b, based on the value of the parameter t. If the value of the parameter is close to 0, the output will be close to a, if it is close to 1, the docs.unity3d.com publ..