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 |
Tags
- Overloading
- 선형모델
- 맵리듀스
- 회귀학습
- Class
- 머신러닝
- Linear Regression
- call by value
- Effective C++
- local minimum
- inheritance
- kubernetes
- Machine learning
- Nonlinear Model
- regression
- member function
- Nonlinear Function
- virtual function
- 비선형모델
- overriding
- c++
- 비선형 함수
- 딥러닝
- 최소제곱법
- MapReduce
- 회귀
- least square
- 지도학습
- struct
- call by reference
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 |
Comments