Answered step by step
Verified Expert Solution
Question
1 Approved Answer
So Godot, and most other game engines have a special method thats a coroutine that runs infinitely until you remove it from memory, its called
So Godot, and most other game engines have a special method thats a coroutine that runs infinitely until you remove it from memory, its called process. Process runs once every frame of the game. Im trying to get something to run along a path, and then stop for a few seconds, then run again. It's easy enough to get it to stop, but the issue here is everything in this method runs, every frame, so i have to have a flag that changes globally so I can skip that segment of code on the next frame. So I move the code into a while loop, whileflagfalse except when I do this, the game object suddenly teleports to the end of the path instead of slowly moving there like normal. Why is that?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started