Hi,
ok,
the distance is equal to the speed*time
so if you know the remaining distance and the speed, and want to know the time it will take:
time = distance/speed
Try this, and let me know how it goes,
bye,
Jean
Thanks Jean. So I have a time float variable, a distance float and speed float variables.
On the object that I want to move back to base in the time left, I have a FSM -
Get Distance (store result to distanceToBase)
Float Operator (float 1 = distanceToBase)
(float 2 = speed)
Operation (divide)
Store Result (my time float?) or a new float?
So, if I have that setup right, (do I store the result in the variable I'm using for time, or in a new float?)
I need to SetDestination in the Navmesh, to base at some point, but I dont know how to use that stored result for what I'm after.
Also, to add to the problem, I'm using a terrain with objects that are set as static. So, whatever time it will take to return back to base, it will always be too short because the route back will not be a straight line.
thanks for any help.