I’m trying to make an elevator move to a position based on the amount of time that’s on an in-game clock. It’s supposed to work similarly to a survival section in some games, where an elevator lift takes a specified amount of time to reach the bottom of a shaft.
As an example, I’ll use a time limit of 30 seconds. If 5 seconds have passed, the platform will be 1/6 the way toward its final position; if 15 seconds pass, it will be halfway; after 30 seconds, the platform should be at its final destination.
I’ve tried setting the speed of the elevator’s descent based on time rather than frames, but the speed is not consistent. Simply setting the speed to “(time limit) * Time.deltaTime” makes run faster the larger the time limit is; using the same equation but dividing the time limit by 60 (which I assumed would aid in making the time limit based on seconds) doesn’t seem to work, either.
Any pointers on moving an elevator based on a specified time limit would be much appreciated.