0
0
Unityframework~10 mins

Rigidbody forces and velocity in Unity - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Rigidbody forces and velocity
Start
Apply Force
Physics Engine Updates Velocity
Velocity Changes Rigidbody Position
Next Frame or Input
Apply Force
This flow shows how applying a force changes velocity, which then moves the Rigidbody each frame.
Execution Sample
Unity
void FixedUpdate() {
  rb.AddForce(new Vector3(0, 10, 0));
  Debug.Log(rb.velocity);
}
Each physics frame, a force pushes the Rigidbody up, changing its velocity which is printed.
Execution Table
StepForce AppliedVelocity BeforeVelocity AfterPosition ChangeOutput
1(0, 10, 0)(0, 0, 0)(0, 0.1, 0)Position moves slightly up(0, 0.1, 0)
2(0, 10, 0)(0, 0.1, 0)(0, 0.2, 0)Position moves more up(0, 0.2, 0)
3(0, 10, 0)(0, 0.2, 0)(0, 0.3, 0)Position moves further up(0, 0.3, 0)
4(0, 10, 0)(0, 0.3, 0)(0, 0.4, 0)Position moves further up(0, 0.4, 0)
5(0, 10, 0)(0, 0.4, 0)(0, 0.5, 0)Position moves further up(0, 0.5, 0)
6No force applied(0, 0.5, 0)(0, 0.5, 0)Position moves by velocity(0, 0.5, 0)
7No force applied(0, 0.5, 0)(0, 0.5, 0)Position moves by velocity(0, 0.5, 0)
ExitN/AN/AN/AN/AForce stops or simulation ends
💡 Force stops or simulation ends, velocity remains constant without new forces.
Variable Tracker
VariableStartAfter 1After 2After 3After 4After 5After 6Final
velocity(0,0,0)(0,0.1,0)(0,0.2,0)(0,0.3,0)(0,0.4,0)(0,0.5,0)(0,0.5,0)(0,0.5,0)
position(0,0,0)slightly upmore upfurther upfurther upfurther upmoves by velocitymoves by velocity
Key Moments - 3 Insights
Why does velocity keep increasing when force is applied every frame?
Because each frame adds force, velocity changes accumulate as shown in rows 1-5 of the execution_table.
What happens to velocity if no force is applied?
Velocity stays the same (rows 6-7), so Rigidbody keeps moving at constant speed without acceleration.
Does applying force instantly change position?
No, force changes velocity first, then velocity moves the Rigidbody position each frame (see flow and position changes).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table at step 3, what is the velocity after applying force?
A(0, 0.2, 0)
B(0, 0.3, 0)
C(0, 0.1, 0)
D(0, 0, 0)
💡 Hint
Check the 'Velocity After' column at step 3 in the execution_table.
At which step does velocity stop increasing?
AStep 3
BStep 5
CStep 6
DStep 1
💡 Hint
Look for when 'Force Applied' is 'No force applied' and velocity stays the same.
If force applied each frame was doubled, how would velocity change at step 2?
AVelocity would be (0, 0.4, 0)
BVelocity would be (0, 0.2, 0)
CVelocity would be (0, 0.1, 0)
DVelocity would be (0, 0, 0)
💡 Hint
Doubling force doubles velocity increase per step, check velocity increments in variable_tracker.
Concept Snapshot
Rigidbody forces add acceleration each physics frame.
Velocity changes based on force and mass.
Velocity moves Rigidbody position each frame.
No force means constant velocity (no acceleration).
Use AddForce() in FixedUpdate() for smooth physics.
Full Transcript
This visual trace shows how applying a force to a Rigidbody in Unity changes its velocity step by step. Each physics frame, the force adds to velocity, which then moves the Rigidbody's position. When force stops, velocity stays constant, so the Rigidbody keeps moving at the same speed. The execution table tracks force applied, velocity before and after, position changes, and output velocity logged. The variable tracker shows velocity and position changes over time. Key moments clarify why velocity accumulates with force, what happens when force stops, and that force affects velocity first, not position instantly. The quiz tests understanding of velocity values at steps, when velocity stops increasing, and effects of changing force magnitude. The snapshot summarizes the core rules for Rigidbody forces and velocity in Unity physics.