Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

Time.deltaTime not working?

$
0
0
Hello I am trying to make an aim down sights script and I was going off an online tutorial. For some reason when I do 10 * Time.deltaTime, it seems to only move the gun 10 frames towards my end position vs if I do 10000 * time.deltaTime it goes all the way to my end position but without any Slerp effect. Am i doing something wrong? Thank you :) public Vector3 aimDownSights; public Vector3 hipFire; // Update is called once per frame void Update() { if (Input.GetMouseButtonDown(1)) { transform.localPosition = Vector3.Slerp(transform.localPosition, aimDownSights, 10 * Time.deltaTime); // transform.localPosition = Vector3.Slerp(transform.localPosition, aimDownSights, 10000 * Time.deltaTime); // transform.localPosition = Vector3.Slerp(hipFire, aimDownSights, 10 * Time.deltaTime); //transform.localPosition = aimDownSights; }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



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