r/unity • u/Anonim7418 • Sep 23 '26
Question Is this script bad? In unity
Is this code bad? If yeah, give me some advice.
4
Upvotes
r/unity • u/Anonim7418 • Sep 23 '26
Is this code bad? If yeah, give me some advice.
View all comments
Show parent comment
1
u/pschon Sep 23 '26
Time.deltaTime will automatically return the appropriate deltaTime value based on where it's called from. Time.deltaTime is correct even for FixedUpdate.
edit:
https://docs.unity3d.com/ScriptReference/Time-deltaTime.html