Professional Documents
Culture Documents
Controljuagador
Controljuagador
Controljuagador
Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
//Movimiento vehiculo
//transform.Translate(0, 0, 1);
//transform.Translate(Vector3.forward * Time.deltaTime * 20);
// transform.Translate(Vector3.forward * Time.deltaTime * velocidad);
transform.Translate(Vector3.forward * Time.deltaTime * velocidad * controlAvance);
// Control giro izquierda y derecha del vehiculo teclas inicio y fin
// transform.Translate(Vector3.right * Time.deltaTime * velocidadGiro * controlHorizontal);
// Control giro rotndo de izquierda a derecha teclas inicio y fin
transform.Rotate(Vector3.up, Time.deltaTime * velocidad * controlHorizontal);
}
}