Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- OverTheWire
- nodejs
- SDK upgrade
- Unity Editor
- Google Refund
- critical rendering path
- MySQL
- springboot
- Unity IAP
- java
- docker
- Camera Zoom
- react
- server
- unity
- Git
- Packet Network
- css framework
- spread 연산자
- draganddrop
- Google Developer API
- Camera Movement
- rpg server
- mongoDB
- Spring Boot
- screencapture
- express
- linux
- --watch
- Digital Ocean
Archives
- Today
- Total
목록Camera Movement (1)
우당탕탕 개발일지
[Unity] 카메라 Drag 이동/줌 및 Scroll 줌 구현
1. 드래그를 할 경우(손가락 or 마우스) 카메라가 이동한다. Y축은 고정이고, x축과 z축만 이동한다. (3D기준) 2. 마우스 휠로 스크롤을 하거나 (PC) 두 손가락으로 확대/축소를 할경우 카메라가 줌/아웃된다. 3. 드래그와 줌 모두 최소/최대값이 존재한다. 이 코드는 외부에서 Init을 수행하고 min,max값을 설정하지 않으면 작동하지 않는다는점을 주의하자 이 코드의 카메라이동은 x와 z 축만 이동이 가능하고, Y축은 고정이라는 점을 주의하자. 만약 Y축을 이동하고싶다면 CheckMoveInput() 부분을 약간 수정하면된다. 더보기 전체코드 using System.Collections; using System.Collections.Generic; using UnityEngine; publi..
Unity
2024. 3. 5. 16:22