Have a total distance traveled constantly update?
I originally followed this thread to be able to record the total distance traveled in game and have that working! However as of right now, it adds large integers rather than continuously counting by 1 like I want it to.
I received help from 'mindfane' on the forums and this was his suggestion:
"PS: If you want to increment the distance at a constant rate, the best place to do that would be in the widget's tick or if you are using normal HUD, then within its Draw event. Instead of displaying the current value of total distance travelled, interpolate between the currently displayed value and the present value of TotalDistance travelled and display the result."
Unfortunately, I just don't really know how to get running what he has suggested. Below is what I started to come up with but just can't figure out how to get the displayed TotalDistance traveled from the 'Total Distance' function from within the widget.
I'm not sure if I'm misunderstanding, but couldn't you keep track of the 'last position' since updating and add the difference between the current position and the last to the total? (eg. totalDist = (currentPosition-lastPosition).Size())
answered Mar 30 '15 at 03:13 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here