Have a simple script that moves an object and rotating it, i want that an object will move while rotating around its axix, but it rotes its Vector perhaps, and works wrong, Thank for any help.
using UnityEngine;
using System.Collections;
public class Meteor : MonoBehaviour {
public float speed = 10f;
void OnCollisionEnter(Collision collision)
{
Destroy(gameObject);
}
// Update is called once per frame
void Update ()
{
transform.Translate(Vector3.down * Time.deltaTime * speed);
transform.Rotate(2, 0, 2);
}
}