Quantcast
Channel: Answers by "MithosAnnar"
Viewing all articles
Browse latest Browse all 42

Answer by MithosAnnar

$
0
0
I have a script that might be able to do that. var aGameObject : GameObject; //you don't have to define this in the inspector var move : float = 5; //the amount to move function Start () { if (move == 5) { //the condition needed to move aGameObject = GameObject.Find("NameOfObject"); //find that GameObject by its name aGameObject.Translate(Vector3.forward * Time.deltaTime * 5); //move it 5 spaces in the z - axis } } I haven't tested it but it should work. Let me know if you get any errors.

Viewing all articles
Browse latest Browse all 42

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>