Every time we need to write some code into the TickComponent function, the same question pops up into my mind. Throughout the courses in Bulls Cow and Escape Room, it is being stressed that we should make our code as smart as possible to avoid impacting the performance of the game / computer. Having the system executing code on every single frame, isn’t that incredibly consuming?
For example the open door component, unless I completely misunderstood it, that code keeps running. Even though the door is visually completely open, the code is still pushing the door further open as it will never exactly hit its targetyaw. So on 60fps, the program executes 216,000 lines of code per hour to keep a single door open, do I get that correct? How does that not impact the performance of the game? It really struck me in this lecture, as we see the UE log bombing away output with our position and rotation when we walk through the game. Can someone give me some color on this why this is ok?
Thanks!