I might misunderstand, but it sounds like you want to say, “make an animation last X seconds long”.
So if that is true, what I’d do is make the default animation last for one second. Then, you can solve a basic equation to figure out what you need to multiply 1 second by in order to make the animation last that long.
If it’s 1 second there isn’t much to solve - just multiply the play rate by the input and it will work.
If you wanted to change speed of actor such that is covers X distance in X time, then you just make formula to solve for that, something like this:
ChatGPT
formula to figure out speed for actor to move so that it covers a given distance within a given time
To calculate the speed at which an actor should move to cover a given distance within a given time, you can use the formula:
Speed = Distance / Time
Where:
Speed is the desired speed of the actor in distance units per time unit (e.g., meters per second, miles per hour).
Distance is the total distance the actor needs to cover, measured in the same units as speed.
Time is the duration within which the actor should cover the distance, measured in the same units as the speed.
By plugging in the values for distance and time, you can determine the required speed for the actor to meet the desired criteria.
For example, let’s say the actor needs to cover a distance of 500 meters within 30 seconds. The calculation would be as follows:
Speed = 500 meters / 30 seconds
Speed ≈ 16.67 meters per second
So, the actor would need to move at approximately 16.67 meters per second to cover the 500-meter distance within 30 seconds.