Lerp not reflection on hololens emulator
HI I am using below code to lerp and object from one place to another.However, I cannot see object moving slowly. I can only see start and end position of an object i.e. object is moved but only see it when it reaches end position. Lerp should move my object slowly based on below code: void PerformReverseTransform(Vector3 position) {
float timeToStart = .1f;
while (Vector3.Distance(startposition, transform.position) > 0.05f)
{
transform.position = Vector3.Lerp(endposition, startposition, timeToStart);
Debug.Log(transform.position);
timeToStart+=.001f;
// f = f + .01f;
}
}
Please help. endposition and startposition are properly captured. My only issue is once my object reaches end position I can c it. Is movement happening too fast. Please not I cannot implement this in update function as I am invoking this from a singleton object.
Your answer
Follow this Question
Related Questions
Tilting a camera around an object 0 Answers
Acces shader color and lerp 1 Answer
Help with recttransform lerp , lags on mobile not on pc. 1 Answer
Lerp to Gaze Location Smoothing Motion Issues (Cardboard) 0 Answers
Lerp a vector2?,Lerp a Vector2? 0 Answers