- Home /
Use Velocity to determine future location of a character given a duration.
Hello.
I'm trying to figure out an algorithm that will allow me to determine where a character will be in x seconds from now given that characters current velocity. This assumes that character is moving in a straight line, but that's okay for this purpose.
Can anyone recommend a quick way to determine that?
thanks
Answer by smacbride · Apr 07, 2016 at 10:28 PM
distance = velocity * time
So if your character is moving at 10 meters/second, then after 3 seconds it will have traveled 30 meters. 30 = 10 * 3
Perfect thank you. I don't know what I was thinking but I was waaaayy over complicating things for some reason.
FuturePosition = (player.transform.position + (ridgedbody.velocity * TimeInSeconds));
Your answer
Follow this Question
Related Questions
How to calculate time it takes for angular velocity to reach 0 w/ angular drag being applied? 2 Answers
Make something arrive at position in exactly X seconds? 2 Answers
BEST way to get velocity Without rigidbody? 2 Answers
Velocity powered rigidbody on a moving platform without parenting. 3 Answers
Increase speed every 5 seconds 1 Answer