Set the Velocity to reach a position at a specific Timestamp
Hello guys !
I need your help for solve a little physic problem !
So, I have a Time, in hours, minutes and seconds. Converted in seconds. (hours 3600 + minutes 60 + seconds ) I have a Position XYZ (Vector3)
And I need to find the velocity (contained in the Rigidbody component) with this two parameters ... (time and position). My object, from its currents position, must reach the position parameter at my timespan parameter.
I have some idea how to do this, but I not a specialist with math. And for be sure, I need an explanation and example. I think, I must to use the Time.time variable, with a function Vector3.Lerp, applied to the Rigidbody.velocity, but I do not know they are the calculations before ...
Can you help me ?
Comment