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;
}
↧