How to change CC to...
Clear all

How to change CC to be timeScale independant?

1 Posts
1 Users
Posts: 3
New Member
Topic starter

Hi guys,

I'm working on a strategy game, and I'd like to know if I can change CameraController to be timeScale free. I know it's heavily relying on deltaTime for it's movement etc but I'm trying. So I changed all references I could find to Time.deltaTime to Time.unscaledDeltaTime, but when I do timeScale = 0 the Camera is invariably frozen in place.

What could have I missed?

It's for strategy game not using any motion/character controller, and using only the TopDown (World) motor.

So far I changed deltaTime to unscaled in these scripts:

BaseCameraRig.cs lines: 319, 333, 345, 352

CameraMotor.cs line 444

YawPitchMotor.cs lines 594, 603, 627, 680, 685

WorldMotor.cs lines 231-233

TimeManager.cs line 33, 47, 49, 104, 114, 117

BasicController.cs line 47, 76

And so far, absolutely nothing changed (and the asset still working perfectly). But the Camera is frozen when timeScale = 0. So I must be missing a method somewhere doing something too advanced obviously.

I don't ask for a code rewrite of course, I know it's unsupported, but if possible maybe a pointer to where I should look be cause only changing Time.deltaTime to unscaled isn't enough. I'd appreciate any info on that, thank you 🙂


Posted : 16/02/2021 11:43 am