Hi i want to calculate time and distance of entity. (i know initial motion, and friction) @SOFe already tried to help me but he probably didn't understand me PHP: while (abs($motionX) > 0.1) { $x += $motionX; $motionX *= 0.98; $timeX++;} i used this to calculate it but its bad method.. So initial motion is motionX and final motion is 0.1 i would like to calculate time, how long it takes than entity motion will be 0.1 and how long path travel in this time.
is it right? PHP: $timeX = log(($friction * $finalSpeed) / abs($motionX)) / log($friction);$distanceX = $motionX * ((1 - ($friction ** $timeX)) / (1 - $friction));
What was the soloution? Others with the same question will not be able to get help by using this thread...