Reply To: Update interval>0 will make the Task using elapsedTime run too long

NodeCanvas Forums Support Update interval>0 will make the Task using elapsedTime run too long Reply To: Update interval>0 will make the Task using elapsedTime run too long

#15169
Gavalakis
Keymaster

Hello there,

You are right. elapsedTime does indeed depend on Time.deltaTime. However the fact that the Wait Action for example takes longer is because with a higher UpdateInterval number, fewer graph (and also action) Update calls are made (instead of 1 Update call per-frame). The Wait Action of course, checks if the target wait value has been reached within its Update call. As such, the Wait action will finish the next time the Update call is made, which can be a few frames away (depending on how high the UpdateInterval is) and that makes it last longer since no Update call and thus no check to see if it has finished is made until that Update call is made.

Can you maybe please let me know how your custom Wait action is implemented to clarify?

Thanks!

Join us on Discord: https://discord.gg/97q2Rjh