Unity Movement Scripts

11 free C# scripts 4 beginner7 intermediate Unity 6000.0+, 2022.3+ MIT licensed

Movement is the first thing a player touches, and the first script most projects need. This category covers the character side, with 2D and 3D player controllers, and the camera side: first-person mouse look, a third-person orbit camera, a top-down strategy camera and a smooth 2D follow camera.

Each base controller has a Pro version that adds the mechanics a finished game tends to need, such as wall jumps, dashes and ledge grabs in 2D, or crouching, ladders and swimming in 3D. Start with the base script to get the feel right, then move to the Pro version or add 2D Platformer Mechanics on top.

Start with 2D Player Controller

Complete 2D character controller with smooth movement, variable-height jumping, and coyote time.

PlayerController2D.cs · 9 Inspector fields · beginner

Open 2D Player Controller
PlayerController2D.cs
Script PlayerController2D
Movement
Move Speed 8
Acceleration 60
Deceleration 50
Jumping
Jump Force 16
Coyote Time 0.15
Jump Buffer Time 0.1
Ground Check
Ground Check None (Transform)
Ground Check Radius 0.2
Ground Layer Nothing

All 11 movement scripts

What these scripts need

Read from each script's source, so this list stays in step with the code.

Kits that build on them

Guides that use them