0
\$\begingroup\$

I am trying to make a set of simplified physics blueprints, very simplified, as an exercise.

I am keeping track of the position of an object and I would like to divide the distance it travels each frame by the time elapsed.

I tried something like this to get the time at the beginning of each TICK event and the time at the end of the same event, subtracting the initial time from the final time but all I get printed is 0.0

Blueprint example

Any idea of what might be wrong? I tried using Get Time Seconds but I get the same result.

\$\endgroup\$
5
  • \$\begingroup\$ "Delta" Seconds usually means the amount of time elapsed within a single frame — so it already includes a subtraction of "now minus previous" — subtracting from it again is unlikely to do what you want. \$\endgroup\$
    – DMGregory
    Feb 24, 2022 at 0:01
  • \$\begingroup\$ @DMGregory so the Delta Seconds from the Event Tick is already the differential? This makes things so much easier, thank you, I'm going to try it now \$\endgroup\$
    – Francesco
    Feb 24, 2022 at 21:22
  • \$\begingroup\$ @DMGregory yeah it works, it's perfect. I can't believe I missed that, thank you so much \$\endgroup\$
    – Francesco
    Feb 24, 2022 at 21:25
  • 1
    \$\begingroup\$ Want to update your answer with your new solution? \$\endgroup\$
    – DMGregory
    Feb 24, 2022 at 22:05
  • \$\begingroup\$ @DMGregory done, thank you again. Do you know if there is an equivalent for the position differential per single frame? \$\endgroup\$
    – Francesco
    Feb 24, 2022 at 23:19

1 Answer 1

0
\$\begingroup\$

As pointed out in the comments, the Delta Time in the Event Tick returns precisely the value I was looking for

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .