using UnityEngine; using System.Collections; public class ConstantVelocity : MonoBehaviour { public Rigidbody target; public Vector3 velocity = Vector3.forward; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } void FixedUpdate() { if (target != null) { target.velocity = velocity; } } }