[HOWTO: Create Spring Arm camera | Flax Documentation]
I used the code from the above tutorial example to control the camera and it worked fine.
Then after I added a new UI control script, I hope to press the Tab key, the game pauses, the UI interface pops up, and I also implemented these functions through IsActive and Time.TimeScale.
However, when Time.TimeScale = 0, the camera is still rotating with the mouse.
I tried to add judgment conditions to the Update method in the camera script:
if (!CamerActor || !TargetActor || Time.TimeScale == 0)
Now it works fine.
My question is, if I have many scripts on objects afterwards, they need to be paused when the game menu is displayed, do I need to make TimeScale judgments in all script Update methods? Is there any easy way to pause the game globally?