Quantcast
Channel: Questions in topic: "follow"
Viewing all articles
Browse latest Browse all 536

MoveTowards only in X coordinates

$
0
0
Hello UnityCommunity! I have this code making an AI following the player in a 2D sidescroller platform, but when player jumps AI behave wrong, I tried a lot of things to fix this. function Follow () { var step = speed * Time.deltaTime; transform.position = Vector3.MoveTowards(transform.position, targetToFollow.position, step); }

Viewing all articles
Browse latest Browse all 536

Trending Articles



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