일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Object Pooling
- Transform
- LayerMark
- 플레이어 방향전환
- 플레이어 이동
- raycast
- apk
- 패럴렉스
- Prefabs
- Blend Type
- Hp바
- raycasting
- CSharp #자료구조
- Animation State Machine
- 오브젝트 풀링
- Parallax
- 프리팹
- 2D슈팅게임
- Ainimation Blending
- 스크롤링
- rigidbody
- 일시정지
- Scrooling
- Unity
- Vector3
- joystick
- Hpbar
- 유니티
- rotation
- Object Poling
- Today
- Total
목록플레이어 이동 (2)
주녘공부일지
Rotation (회전) 월드 공간상에서의 트랜스폼의 회전을 나타냄 ( Quaternion으로 저장 ) Quaternion은 복잡한 수를 기반으로 하기에 직관적으로 이해하기 쉽지 않으므로, 회전에 사용한다고만 알아둠 1) transfrom.Rotate using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { float _yAngle = 0f; void Update() { transform.Rotate(new Vector3(0f, Time.deltaTime * 100f, 0)); // y축 방향으로 회전 _yAngle += Time.del..
1. 3D 플레이어 이동 구현 ( position ) using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { [SerializeField] float _speed = 10.0f; void Update() { if (Input.GetKey(KeyCode.W)) transform.position += new Vector3(0f, 0f, 1f) * Time.deltaTime * _speed; if (Input.GetKey(KeyCode.S)) transform.position -= new Vector3(0f, 0f, 1f) * Time.de..