Skip to content
Snippets Groups Projects
move.cs 336 B
Newer Older
using UnityEngine;
using System.Collections;

public class move : MonoBehaviour 
{
	void Update () 
	{
		//Object barco =;
		Vector3 dir = Vector3.zero;
		dir.z = Input.acceleration.x;
		transform.Rotate(dir * Time.deltaTime * 80, Space.World); 


		if(transform.localEulerAngles.z >= 90){
			transform.Rotate(0, 0, 90);



		}