Similar Posts

Subscribe
Notify of
1 Answer
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
JonasBraus749
1 year ago

Hi.

is easy to use Vector3.Lerp(a,b,p);

a is the starting position of your platform

b is the end position of your platform

p are the percentage of vector between a and b (example: 0.5 (50%): your platform is exactly between a and b)

that could look like this:

p = 0;

void Update()

transform position = Vector3.Lerp(new Vector3(0, 3.8f, 0), new Vector3(0, 5.55f, 0), p);

p += Time.deltaTime * “a factor”;

}