Quantcast
Channel: Answers for "How to use "move to target"?"
Viewing all articles
Browse latest Browse all 4

Answer by vatsalAtFEI

$
0
0
I haven't come across the moveto target and the scripting Unity manual also doesnt show up anything like that, but theres a different way you can do it. Heres something in JS: var target : Transform; var speed : int; function Update(){ transform.position = Vector3.MoveTowards(transform.position, target.position, Time.deltaTime * speed); } just save this and add it to the ball. Once the script is compiled, drag the cube from the heirarchy to the 'target' variable.

Viewing all articles
Browse latest Browse all 4

Trending Articles



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