Enter the following code into your game script to create a constant speed variable:
var ConstantSpeed : float = x;
Replace the "x" with the numerical speed value that you want to apply to the moving object.
Enter the following code into the script of your object to create an update function:
function Update ()
Type the following code between the brackets of the update function to apply the speed variable to the object:
transform.position.x = transform.position.x + ConstantSpeed;
Related Posts "Technology"
7/11/2019 4:38:00 AM
7/10/2019 11:11:00 PM
You might also like on "Technology"
7/10/2019 3:41:00 PM