Recall & Review
beginner
What is the main difference between
Update() and FixedUpdate() in Unity?Update() runs once per frame and is used for regular frame-based updates like input handling. FixedUpdate() runs at fixed time intervals and is used for physics calculations.Click to reveal answer
beginner
Why should physics-related code be placed inside
FixedUpdate()?Because physics calculations in Unity run at fixed time steps, placing physics code in
FixedUpdate() ensures consistent and stable physics behavior regardless of frame rate.Click to reveal answer
intermediate
What happens if you put physics code inside
Update() instead of FixedUpdate()?Physics code in
Update() can cause inconsistent behavior because Update() runs at variable frame rates, leading to unstable or jittery physics.Click to reveal answer
intermediate
How often does
FixedUpdate() run compared to Update()?FixedUpdate() runs at a fixed interval (default 0.02 seconds), which can be multiple times per frame or less often, depending on frame rate. Update() runs once per frame.Click to reveal answer
beginner
Can you use
Update() and FixedUpdate() together in the same script? Why?Yes, you can use both. Use
Update() for input and visual updates, and FixedUpdate() for physics to keep things smooth and stable.Click to reveal answer
Which Unity method is best for handling user input every frame?
✗ Incorrect
Update() runs every frame and is ideal for input handling.How often does
FixedUpdate() run by default?✗ Incorrect
FixedUpdate() runs at fixed time steps, usually every 0.02 seconds.What is the risk of putting physics code inside
Update()?✗ Incorrect
Because
Update() runs at variable frame rates, physics can behave inconsistently.Which method should you use to move a Rigidbody smoothly in Unity?
✗ Incorrect
Use
FixedUpdate() for Rigidbody movement to sync with physics updates.Can
FixedUpdate() be called multiple times per frame?✗ Incorrect
FixedUpdate() can run multiple times per frame if the frame rate is low.Explain when and why you would use
FixedUpdate() instead of Update() in Unity.Think about physics and timing.
You got /4 concepts.
Describe the consequences of handling input inside
FixedUpdate() instead of Update().Consider how often input is checked.
You got /4 concepts.