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

can I have some help with my "following on the x and z axies" script?

$
0
0
here's the code I'm using: using System.Collections; using System.Collections.Generic; using UnityEngine; public class follow : MonoBehaviour { public Transform follow_target; void Upate() { transform.position = new Vector3(follow_target.position.x, transform.position.y, follow_target.position.z); } } now here are the t$$anonymous$$ngs i need help with: 1. why won't it work? I've set it a target and applied to a Game Object, other methods use the same code... why doesn't it work for me? 2. how can I add a "speed value" so it doesn't go to said position instantly but instead has a smooth transition?

Viewing all articles
Browse latest Browse all 536

Latest Images

Trending Articles



Latest Images

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