Quantcast
Viewing all articles
Browse latest Browse all 60

Answer by Narv

by button do you mean the GUI.Button() function in the OnGUI() method? If so then you just wrap it in an if statement and inside the if statement you put the code to move your character. void OnGUI() { if(GUI.Button(...)) { // function to move character transform.position = Vector3.Lerp(start, end, time); } }

Viewing all articles
Browse latest Browse all 60

Trending Articles



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