|
### 6월 28일
|
|
### 6월 28일
|
|
Stick_Game 만들기
|
|
Stick_Game 만들기
|
|
==================
|
|
==================
|
|
*Unity engine의 3d를 이용해서 상품을 미는 게임을 만들었다
|
|
Unity engine의 3d를 이용해서 상품을 미는 게임을 만들었다
|
|
1.Stick이라는 object만들기
|
|
--------------------------------------
|
|
2.Rigidbody(중력), collider(충돌) 성질 넣어주기
|
|
+ ### Stick이라는 object만들기
|
|
3.c# script로 코드를 형성한 후 Stick object에 넣어서 움직이기
|
|
* object는 기본적으로 Transform(좌표),Rotation(회전),Scale(크기) 의 성질들을 가지고 있어서 변형 가능하다.
|
|

|
|

|
|
|
|
|
|
|
|
+ ### Rigidbody(중력), collider(충돌) ,Material(그림, 색, 질감) 성질 넣어주기
|
|
|
|
+ why?
|
|
|
|
collider component를 추가 했을때 막대와 object가 충돌 시 서로 통과하지 않고 물리적으로 부딪힘.
|
|
|
|

|
|
|
|
Rigidbody component를 추가 했을때 해당 object의 중력이 작용 >> 막대로 밀었을때 밑으로 떨어짐.
|
|
|
|

|
|
|
|
Material component는 object에 그림을 삽입하거나, 색을 넣어 주고, 질감을 표현 하는 기능들을 해준다.
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
+ ### c# script로 코드를 형성한 후 Stick object에 넣어서 움직이기
|
|
|
|
* why?
|
|
|
|
게임 안에서 object를 움직이기 위해서는 script를 이용해 좌표를 이동 시켜야 한다.
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|