Advertisemen
This video will show you how to create gear rotate effect in unity.
Code used in this video :
using UnityEngine;
using System.Collections;
public class rotateGear : MonoBehaviour
{
public GameObject gearOne;
public GameObject gearTwo;
// Update is called once per frame
void Update ()
{
gearOne.transform.Rotate(0, 1, 0);
gearTwo.transform.Rotate(0, -1, 0);
}
}
using System.Collections;
public class rotateGear : MonoBehaviour
{
public GameObject gearOne;
public GameObject gearTwo;
// Update is called once per frame
void Update ()
{
gearOne.transform.Rotate(0, 1, 0);
gearTwo.transform.Rotate(0, -1, 0);
}
}
Music Credit :
Professor Umlaut Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
http://creativecommons.org/licenses/b...
Thanks for watching
Please subscribe for more videos
Advertisemen
Tidak ada komentar:
Posting Komentar