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 ControllerAll 11 movement scripts
- 2D Player Controller Complete 2D character controller with smooth movement, variable-height jumping, and coyote time.
- Smooth Camera Follow 2D Smooth camera follow with offset, dead zone, and look-ahead for 2D games.
- First Person Camera First person mouse look camera with sensitivity, vertical clamp, and cursor lock. Plug into any FPS or exploration game.
- Top-Down Camera RTS/strategy camera with WASD panning, edge scrolling, scroll wheel zoom, and optional target follow.
- 3D Player Controller First/third person character controller with smooth movement, jumping, and slope handling using CharacterController.
- Third Person Camera Orbit camera with collision detection, zoom, and vertical angle limits. Ideal for action-adventure and RPG games.
- 2D Platformer Mechanics Wall jump, wall slide, dash, and double jump mechanics for 2D platformers. Drop-in extension for the 2D Player Controller.
- 2D Player Controller ProPro Advanced 2D character controller with wall jump, wall slide, dash, double jump, ledge grab, and moving platform support.
- 3D Player Controller ProPro Advanced 3D character controller with crouch, slide, ladder climbing, swimming, stamina system, and footstep audio.
- First Person Camera ProPro Advanced FPS camera with head bob, weapon sway, lean, recoil system, and FOV zoom for immersive first person gameplay.
- Third Person Camera ProPro Advanced orbit camera with lock-on targeting, shoulder swap, cinematic mode, and swappable camera profiles for versatile third person gameplay.
What these scripts need
Read from each script's source, so this list stays in step with the code.
Reads the legacy Input Manager (UnityEngine.Input). If Project Settings > Player > Active Input Handling is set to Input System Package only, Unity throws an InvalidOperationException; set it to Both.
All of them: 2D Player Controller, Smooth Camera Follow 2D, First Person Camera, Top-Down Camera, 3D Player Controller, Third Person Camera, 2D Platformer Mechanics, 2D Player Controller Pro, 3D Player Controller Pro, First Person Camera Pro, Third Person Camera Pro
Requires Rigidbody2D on the same GameObject.
3 of 11: 2D Player Controller, 2D Platformer Mechanics, 2D Player Controller Pro
Requires CharacterController on the same GameObject.
2 of 11: 3D Player Controller, 3D Player Controller Pro
Kits that build on them
- 2D Platformer Starter Kit Complete 2D platformer foundation with movement, camera, advanced mechanics, health, collectibles, and transitions.
- FPS Foundation Kit First-person shooter foundation with movement, camera, weapons, projectiles, health, and screen shake.
- RTS Starter Kit Real-time strategy foundation with camera, click-to-move navigation, unit selection, minimap, and wave spawning.
Guides that use them
- Free Unity C# Scripts and Game Systems: 55 Copy-Paste Tools for Indie Games A catalog of 55 free Unity C# scripts and 13 game systems: movement, camera, health, save/load, UI, AI, mobile controls, inventory and dialogue.
- Unity 2D Platformer Tutorial: Free Scripts & Complete Setup Build a complete 2D platformer in Unity with free scripts for player movement, camera follow, collectibles, health, and polish effects. Step-by-step guide with code.