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