Augmented Reality Tutorial for Beginner 5: User Interface(UI) AR model with Unity3D and Vuforia
Автор: Sam Huang
Загружено: 2018-03-07
Просмотров: 16192
Описание:
This video is to teach you how to use UI to control the model using Unity 3D and Vuforia.
If you learn something, please hit the like button and subscribe :)
If you have any questions you can leave message!
Source code:
public float scalingspeed = 0.01f;
bool ScaleUp = false;
bool ScaleDown = false;
// Update is called once per frame
void Update () {
if (ScaleUp == true)
ScaleUpButton();
if (ScaleDown == true)
ScaleDownButton();
}
public void ScaleUpButton()
{
GameObject.FindWithTag("Boy").transform.localScale += new Vector3(scalingspeed, scalingspeed, scalingspeed);
}
public void ScaleDownButton()
{
GameObject.FindWithTag("Boy").transform.localScale += new Vector3(-scalingspeed, -scalingspeed, -scalingspeed);
}
public void Up()
{
ScaleUp = true;
ScaleDown = false;
}
public void Down()
{
ScaleUp = false;
ScaleDown = true;
}
public void Stop()
{
ScaleUp = false;
ScaleDown = false;
}
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: