Rotation on object without changing axis

First of all I use the next script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyBolt : MonoBehaviour {

	public Vector2 velocity;
	void Start()
	{
		GetComponent<Rigidbody2D> ().angularVelocity = Random.value * 5;
	}
	void FixedUpdate () 
	{
		transform.Translate (velocity * Time.deltaTime);
	}
}

my problem is that: I cannot make my Bolt to rotate without changing moving direction. How can I do that? Without start function my Bolt move in one direction (that is good) but with Start function my bolt start to make circle

try to add this line in FixedUpdate and Get Rid of that Start

gameObject.transform.rotation = Quaternion.LookRotation(gameObject.GetComponent<Rigidbody2D>().velocity);

GetComponent().velocity = new Vector2 (EnemyBoltSpeed,0);

GetComponent ().angularVelocity = -360;

it will make your object to move and rotate :slight_smile:

hope it works :smiley: