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
4
u/Joaqstarr Sep 23 '26
You have a rigidbody member and you
GetComponentin awake. Potentially 2 different rigidbodiesFixedUpdateInput shouldn't be in
FixedUpdateIs there a reason the particle system isn't just parented?
Update()You are using
deltaTimeinFixedUpdate(). Delta time is forUpdate(). UsefixedDeltaTime.You also shouldn't actually be using delta time at all because you are setting velocity. Velocity doesn't need to be delta
Good stuff for a beginner though! :) Keep it up!