Answer the question
In order to leave comments, you need to log in
Why is Lerp slower on a smartphone?
I do the usual moving to a point using Lerp, everything works fine and at the right speed, I put the same test on a smartphone and everything happens there, but 3 times slower, why can this be?
void Update(){
Test.transform.position = Vector3.Lerp(Test.transform.position, TargetPosition, 5f * Time.deltaTime);
}
Answer the question
In order to leave comments, you need to log in
where do you learn how to write such a LERP with a dynamic starting point? to move at a uniform speed, you need to take the starting point and the end point as static, changing only the interpolation coefficient from 0 to 1
, for example (you can also do initialization in your own way)
public GameObject Test;
public Vector3 StartPosition;
public Vector3 TargetPosition;
void Start() {
StartPosition = Test.transform.position;
}
void Update(){
Test.transform.position = Vector3.Lerp(StartPosition, TargetPosition, 5f * Time.deltaTime);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question