Рет қаралды 12,840
In this tutorial, I am going to show you how to make a selection panel for selecting the car in Augmented Reality.
Please like and subscribe!
Facebook: / augmentedrealitygaming...
Music: Jim Yosef - Can't Wait
Link: / jim-yosef-cant-wait-fe...
Artists: @jim-yosef @annayvette
#Scrip1: CarSelector.
using UnityEngine;
using System.Collections;
public class CarSelector : MonoBehaviour {
public GameObject Car1;
public GameObject Car2;
public GameObject Car3;
public int BallSelected;
// Use this for initialization
void Start () {
Car2.SetActive (false);
Car3.SetActive (false);
}
public void LoadCar1(){
Car1.SetActive (true);
Car2.SetActive (false);
Car3.SetActive (false);
}
public void LoadCar2(){
Car1.SetActive (false);
Car2.SetActive (true);
Car3.SetActive (false);
}
public void LoadCar3(){
Car1.SetActive (false);
Car2.SetActive (false);
Car3.SetActive (true);
}
}
#Script2:Rotate
using UnityEngine;
using System.Collections;
public class Rotate : MonoBehaviour {
// Update is called once per frame
void Update () {
transform.Rotate(0,20*Time.deltaTime,0);
}
}