Questions tagged [lerp]

Lerp is a function which Interpolates between two values in a specific time `t` to create smooth animations.

Linearly interpolates between two vectors.

Interpolates between a and b by t. t is clamped between 0 and 1. It is used to create smooth changes of all type of ui controls. Changing the Audio, a Color or transform values of an game object in unity3d can be done with Lerp easily.

Documentation

170 questions
-2
votes
1 answer

How do I use a linear interpolated set of x and y coordinates on top of the original coordinates with a mouse_move function

I have a mouse move function which takes a "vecd2" which has an x and y coordinate, and the function simulates mouse movement. I want to simulate mouse movement to a set of coordinates in a table, and also create a smoother effect by moving to the…
-2
votes
1 answer

Unity : How can I create and scale up 100 cubes over time one by one with using Vector3.Lerp function

How can I create and scale up 100 cubes over time one by one with using Vector3.Lerp function. I need to be dependent on the duration variable. I need an efficient way.
Elif
  • 141
  • 13
-2
votes
2 answers

What's Happening When Lerping Using Time.deltaTime?

I've just recently been introduced to Time.deltaTime and lerping and have been kinda stuck for the past few days. So when I plug in Time.deltaTime for the last float and then multiply by another float variable called speed, what exactly is…
Bretinat0r
  • 61
  • 5
-2
votes
1 answer

Vector3.Lerp bug?

I know how to move GameObject over time, but I have a weird bug. I am trying to create nice animation where the camera moves forward on button click and backward on second button click. I am using the code from here to do the animation and have a…
SagiZiv
  • 932
  • 1
  • 16
  • 38
-3
votes
1 answer

Unity: How to make a sprite move using Vector3.Lerp() without StartCoroutine

I want to move a sprite using Vector3.Lerp() without StartCoroutine. Starting and target points want to set in the script. I drag & drop the sprite into the Unity Editor and run it. However, the sprite doesn't move. Thanks. using…
user1232250
  • 329
  • 3
  • 19
1 2 3
11
12