Question relates to Timescale&timestep

ttesjt

New member
Hi there. I have some question about time in general.

I am implementing a slow motion system to improve the visual impression. However, I have noticed that almost all physics abilities are effected if I change the time scale. Most obviously, I don't jump as high. This was a little bit unexpected. I read into some previous posts and some have mentioned the same. However, no one give an answer to fix this.

In addition to this. I found that timestep will also effect the ability. I want to decrease the default timestep to ~0.01, but then all the physics part like jumping was effected by this change.

So the questions are:
1: how to implement a slow mode? (Not just slow the player, but also the whole game) In other words, what should I do to sync the player's physics after touched the timescale.

2: how to change the timestep without having to change all properties values.

3: Is there a way to completely get ride of the time related issues as without a trade off of losing core mechanisms. Do I still have the option to use Update instead fixedupdate? Seemingly most of time related problem were caused by fixedupdate and fixed frames. Most simply, I want things act dependently with timescale.

4: I haven't try it yet, but is UCC effected if I use Unity recorder and frame rate is cut to nearly 1 fps. (I don't know how unity recorder handle the time when frame rate is low.)


Thank you!
 
Last edited:
Are you on version 2 or version 3?

The character locomotion component contains its own timescale property that you can adjust for a single character, but to me it sounds like you want everything to be affected so you should adjust the Unity physics timescale property. In version 3 the controller only uses FixedUpdate and not Update. You do not want to change the timestep in this case. I have not used the Unity recorder so I'm not sure how that affects the timestep.
 
Hi there. Thank you for the fast reply in such a late time.

I am using v3

I did more exp about this. I wrote a simple jump ability to test this. The only thing "simple jump" does is
in Update:
currentLocalMovement.y = externalForce.y; // a fixed number
unscaledTime += Time.unscaledDeltaTime;

I have noticed that the unscledTime is always the same value(nearly) despite the Time.timeScale = in range of (0.2f - 10f). This looked to me the gravity or the whole motion was not timely scaled by unity' timescale

I want to have a slow motion for everything when entering some triggers. I tried Time.timeScale but this one messed up the ability like jump height. (because motions are not scaled by time IG)

Do you know what is a fix to this?
 
This does sound like it'll take some more modification of the ability/locomotion in order to properly support. I have added this to my list for things to take a look at. Right now I won't be able to get to it until after all of the abilities are out but I will let you know as soon as I do. For now if you want to start I would focus on the external force within the character locomotion component. This is the value that gets added every frame and likely needs to be scaled differently.
 
Cool! I will try to find some customized work around for now. Thank you for replying so promptly again. Have a great one(y)
 
Top