Files
2025-05-13 03:19:28 +03:00

24 lines
403 B
C#

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;
}
}
}