Ben Traje
← Back to unity

Unity Character Controller

28 Feb 26 (1mo ago)

General

  • Kinematic (Character Controller) vs Rigid Body (Physic))

Character Movement

Character Rotation

Crouch

Using Jump

Third Person Camera

Animation Layer

Others

Procedural Foot

Rigid Body

Add Force vs Linear Velocity

Add Force:

How it works: It applies an impulse or continuous force that builds up over time based on the object's mass (F=ma).

Best for:

Explosions or wind.

Vehicles (cars, rockets).

Pushing objects (like a crate).

Jumping (using ForceMode.Impulse).

Pros: It plays nice with Unity’s physics engine; multiple forces can act on the object simultaneously without overriding each other.

Cons: Can feel "floaty" or sluggish for character movement because it takes time to reach max speed.

Linear Velocity

ow it works: It overrides the current velocity vector. You are essentially telling the physics engine: "Forget what was happening; go this fast in this direction right now."

Best for:

Platformer character movement (Left/Right).

Projectiles (bullets, arrows).

Arcade-style games where movement must feel "tight."

Pros: Extremely responsive and predictable.

Cons: It can feel "unnatural" because it ignores mass and acceleration. If you set it every frame, you might accidentally negate other forces (like gravity or a collision) unless you preserve the other axes (e.g., rb.linearVelocity = new Vector3(speed, rb.linearVelocity.y, 0)).