unidade como mudar a rotação
transform.eulerAngles = new Vector3(0f, 180f, 0f); //rotates 180 degrees
Relieved Raccoon
transform.eulerAngles = new Vector3(0f, 180f, 0f); //rotates 180 degrees
// To set the position of a gameobject use the following
GameObject.transform.position = new Vector3(x, y, z);
float rotationX = 0;
float rotationY = 0;
// you might also have some rotation speed variable
void Update() {
rotationX += Input.GetAxis("Vertical") * Time.deltaTime;
rotationX = Mathf.Clamp(rotationX, minRotationX, maxRotationX);
rotationY += Input.GetAxis("Horizontal" * Time.deltaTime;
transform.rotation = Quaternion.Euler(rotationX, rotationY, 0);
}
gameObject.transform.eulerAngles = new Vector3(
x_rot,
y_rot,
z_rot
);
gameObject.transform.eulerAngles = new Vector3(
x_rot,
y_rot,
z_rot
);