Quantcast
Channel: Questions in topic: "gun"
Viewing all articles
Browse latest Browse all 592

Why is .Lerp so bumpy?

$
0
0
I am trying to make my own gun script and for some reason my gun is acting super bumpy. My script is: public Transform gunHolder; public float holdSide = 0.3f; public float holdHeight = -0.2f; public float moveSpeed = 1; public float rotateSpeed = 1; void Start () { } void Update () { gunHolder.localPosition = new Vector3(holdSide, holdHeight, 0); transform.position = Vector3.Lerp(transform.position, gunHolder.position, moveSpeed); transform.rotation = Quaternion.Lerp(transform.rotation, gunHolder.rotation, moveSpeed); } Does anyone know a better way of doing this? Thanks.

Viewing all articles
Browse latest Browse all 592

Trending Articles



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