2017년 2월 2일 목요일

Unity - 6 - Let's make game object

Longtime no see guys~! It's lucid code who you waited !!
... today we'll make game objects which is not player Non - Player - Object


1. First , let's make cube object which is named 'PickUp'


2, and then hide Player object by check off check box next to Name box of it


3. and change measure of PickUp's transform , Position , Rotation and Scale !
each as Position ( 0 , 0.5 , 0 ) , Rotation ( 45 , 45 , 45 ) , Scale ( 0.5 , 0.5 , 0.5 )


4. for giving spin effect to Object , create script which is named 'Rotator' in PickUp object


5. The Rotator's code is simple

Using ~~ (it will be automatically generated)

Void Update(){
       transform.Rotate(new Vector3(15, 30, 45) * Time.deltatime);
}

this is key code that means just rotate each axis 15 , 30 , 30 per arranged time


6. Let's make empty object which is named 'PickUps' and put PickUp object in Pickups


7. make more PickUps by using copy and paste !


8. and then make material and give it one PickUp and click Apply (i signed it to find easy)


9. and for checking it , do test !!

댓글 없음:

댓글 쓰기