why it speed different?
WRYYYYYY
void Update() {
gameObject.transform.Translate(Vector3.left * Levelinf.speed * 50f * time.deltaTime);
}
and
void FixedUpdate() {
gameObject.transform.Translate(Vector3.left * Levelinf.speed);
}
Update() is faster than FixedUpdate()
Why???
I thought Vector3.left * speed * 50f * time.deltaTime at Update and Vector3.left * speed at FixedUpdate is same.
Update is faster than FixedUpdate I set Fixed Timestep 0.02
whyyy
Well, it's truly good psychologist's question. Who knows why (1 * 50) is higher number than (1)..
one's multiple by 50 and Time.DeltaTime, while the other is not.
Tell me after you think FixedUpdate is called 50 times per 1 second. and Update is called FPS times per 1 second.
void Update() { gameObject.transform.Translate(Vector3.left * Levelinf.speed * 47f * time.deltaTime); }
void FixedUpdate() { gameObject.transform.Translate(Vector3.left * Levelinf.speed); }
if I write like this, FixedUpdate is faster than Update.
It's really more complicated. Results won't be the same on others hardware.
Here you are some discussions, explanations:
https://unity3d.com/learn/tutorials/topics/scripting/update-and-fixedupdate
https://answers.unity.com/questions/1291826/does-fixedupdate-get-called-every-002-seconds.html
https://answers.unity.com/questions/10993/whats-the-difference-between-update-and-fixedupdat.html
FixedUpdate isn't correct? or time.deltaTime isn't correct?
I know that results won't be same on others hardwares. but I used time.deltaTime or FixedUpdate. won't it makes results same?
Your answer
![](https://koobas.hobune.stream/wayback/20220612155730im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Animation Progress Bar and Animation Always Has To Finish 1 Answer
Unusual Unit Slowdown 0 Answers
2D platformer IEnumerator problems 1 Answer
How to get static speed 1 Answer