#not slowing down
1 messages · Page 1 of 1 (latest)
Can you explain why are you using time.deltaTime?
@uncut magnet You need to manipulate your Slow variable, you are just subtracting from it, it will remain the same. And deltaTime is affected by scaling, use unscaledDeltaTime
well overload :l
Don’t use that
Movetowards is a Vector3 function to move
Have you tried Mathf.Lerp?
lerp?
well still 3 floats... same as the movetowards...
Look at the usage in the manual
is the timescale wokring if its more than 1 decimal?
Probably
How are you setting it?
time.timescale = 1 - time.deltatime;
This is just the same setup which I told you this about. Did you read it?
You need to manipulate your Slow variable, you are just subtracting from it, it will remain the same. And deltaTime is affected by scaling, use unscaledDeltaTime
unscaleddeltatime?
Anything you don't understand, put example into the code and see how it works
what it does
And any questions you have put into the search engine
Do you know what deltaTime does?
no
idk how its made or how much skips
It's time between frames execution
So if you have constant 50 frames per second deltaTime will always be 0.02f
but why its going up to 1?
it's not
and deltaTime is affected by scaling time
ohh
if you want value of time between frames unaffected by time scaling you use unscaledDeltaTime
So if you want to reduce scale you need variable that is set outside of the scope.
i got an idea
and reduce that variable using unscaled time then assign the variable
how do i put to sleep without freezing the game?
What are you trying to do?
well
manipulating timeScale only affects scripts and animations using deltaTime
i wanted to make my own deltatime i know
Again, if you don't know how something works. Use examples in your scripts and output values into console with debug messages or text element to see the result and understand
i mean 0.1, 0.2, 0.3,..., 1 in 1 sec
if you sum up deltaTime values during 1 second runtime, it will amount to 1 second.
ok..
if you set timeScale to 0.5f, it will take 2 seconds to get 1 second.
Test things, see how they work, then ask questions
What do you mean by that, already asked you?
i mean on .net u make new thead and use thread.sleep(ms)
so u wont freeze the whole program
Unity has only one thread
If you want to use threading in Unity use Jobs system
i see this is easier maybe
You can only use threading on stuff that doesn't affect engine without it