- Home /
Question by
melvinweert · Oct 06, 2020 at 11:23 AM ·
c#fpslerp
Aim down sights (HELP)
Im making an small fps game. I've just got aiming down sights working but was wondering how to make the transition smooth insteads of it just instantly aiming down sights. I read about Lerp but don't really know how to use it. Here's my script:
public void aimDownSights()
{
if (Input.GetMouseButton(1))
{
this.transform.position = AimDownSightsDest.transform.position;
Crosshair.SetActive(false);
isAimingDownSights = true;
}
if (Input.GetMouseButtonUp(1))
{
this.transform.position = NormDest.transform.position;
Crosshair.SetActive(true);
isAimingDownSights = false;
}
}
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
First Person Character, Mecanim. 1 Answer
c# wait script 2 Answers
Scale Object Using Lerp? 2 Answers