Topic was automatically imported from the old Question2Answer platform.
Asked By
ashish
I having trouble disabling the _process(delta) function.
I know that we have a method set_process(false), but somehow I am not able to disable the process(delta) function by calling this method from another function. Whatever function is being executed keeps getting executed over and over again despite a call to set_process(false) method. If I set an if condition and call this method within the if block, it doesn’t work, even when the if condition becomes true.
What am I doing wrong?
Can someone please give an example of how to enable and disable the _process(delta) function?
As you said yourself, set_process(false)is disabling virtual _process() function and should work very straightforward.
There could be a number of reasons why it is not working for you. Maybe you’re calling it for wrong node, maybe you’re not calling it at all.
But guessing is a wrong approach in programming. Use debugger to see what’s exactly going on. Post your code here (a minimal example that reproduces an issue).