Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- c++
- 맵리듀스
- member function
- 머신러닝
- Machine learning
- 선형모델
- 회귀학습
- MapReduce
- 회귀
- Overloading
- 지도학습
- Nonlinear Function
- regression
- kubernetes
- inheritance
- 비선형모델
- overriding
- Effective C++
- Class
- virtual function
- local minimum
- struct
- Nonlinear Model
- 딥러닝
- 최소제곱법
- least square
- call by reference
- Linear Regression
- call by value
- 비선형 함수
Archives
- Today
- Total
J's Study log
[Unity] Input Arrow Keys 본문
To make object spin we will use localEulerAngles. localEulerAngles is a way to express Rotation in script which uses the Euler Angles.
If you see the first line of Update() function
You can see 'transform.local.EulerAngles.z', this means object's rotation of z.
And in second line Input.GetAxis("Horizontal"); means if user input right or left arrow key each '+1' or '-1' is inputted. If you want to have inputted up or down arrow key put 'Vertical' instead of 'Horizontal'.
So the value of zRotation will change if user input arrow keys.
And by substituting 'Vector3' in 'localEulerAngles' and 'zRotation' in 'Vector3', user can control the zRotation of the object.
'Computer Language > Unity' 카테고리의 다른 글
[Unity] Input Mouse Button (0) | 2019.02.27 |
---|---|
[Unity] Input keys (0) | 2019.02.25 |
[Unity] Camera Work (0) | 2019.02.25 |
[Unity] GetComponent (0) | 2019.02.23 |
[Unity] Script (0) | 2019.02.23 |